Sunday, September 26, 2010

Threading and Mutexes

So the overall assignment this week was more or less the same as last week, make your main/parent program call a thread to do the fibbonacci work. That was easy, so easy I did it at 3am friday morning when I couldn't sleep, in about 30 minutes, it took a little bit of rework from the fork program I wrote last week, but was simple to implement.

This morning I was thinking about mutex's.  I know that you use a mutex as a semaphore of sorts in that when you've locked it other processes needing to use it (or really use some variable you're about to modify) won't be able to.

So what I did was lock it in the child thread, then when the sibling thread attempts to lock it, it can't, and then forces it to wait until it's unlocked once the child unlocks then the sibling can print the elements of the shared memory.

Remember to include pthreads, you simply have to #include
then to compile it would be gcc -pthread -o filename.o

Good luck!

Here are a few screen shots of the results.
Fibonacci Threaded

Fibonacci with Mutexes

Tuesday, September 21, 2010

Books I would like to read 9/21/2010

Here is a list of the books I would like to sit down and spend some time reading front to back.

Let me know if you have one on your list that I would like.
Pthreads Programming: A POSIX Standard for Better Multiprocessing (O'Reilly Nutshell)
I've poked through this a bit, my buddy Phil lent me the book, and I would really like to get through it, maybe I'll knock a few chapters down this weekend if I don't have too much homework.

C Programming Language (2nd Edition) (K and R C, the definitive guide)
I borrowed this from the library at work, but only got a little into it, unfortunately work and school come first.

Mastering Regular Expressions
I borrowed this one from work, and got through the first 3 or 4 chapters, but then it started getting into the greedy etc matching and I kinda slacked off, I would like to finish this book as what I've learned from it so far has been INVALUABLE.

Linux Device Drivers, 3rd Edition
I have the second edition of this book, and it's a great book, but it only covers up to the Kernel version 2.4, the 3rd edition however covers up to 2.6 so that's great news. There is a free version of the book here: Linux Device Drivers 3rd Edition *Free

I'll give you my next list. If you've read these books give me your opinion, or maybe suggest a better one in place of the ones I've selected.

Saturday, September 18, 2010

Operating Systems -- A shared memory project

Well I decided to start hacking away at my homework for my operating systems class, in the course of about 3 hours, I managed to finish the project and make breakfast....All in all I would say it was a productive morning.

I am not going to share my source code, for reasons I'm debating about writing a post about, to make a long story short, is it ethical to post about your homework? I do think that sharing knowledge in this day and age is what will enable us (humanity) to become smarter as a whole (I think), however there is a line, explaining about shared memory for example and how it works, with examples is valid, literally posting my code up for people to simply copy and paste into their HW not so awesome.

Lets get into it, as part of the assignment we were asked to record our observations and the likes.

First off, the first problem wasn't really all that hard, initially I started to do it recursively, but decided not to, as I was just not thinking right this morning, and writing a simple for loop to do this was WAY easier.

Lets get into the meat of the project, the two main goals were forking and shared memory, the forking was relatively easy, simply creating a variable to hold your pid and then checking whether it's 0 or some other number tells you whether you are the parent or not. Then simply doing something different based on whether you are a parent or not (or if there was a pid error) was all that was required.

Shared memory was a little trickier, and I think I finally get it. Here is the deal, first we create a numerical identifier for the shared memory. Now we can begin to fork, and in the child process we create an attachment to the memory in each child process, THEN in the parent we do the same (This way we KNOW we aren't using the shared variable, it's actually memory, because we're using two different variables and I didn't assign them as pointers).

Now when you're done in the children we just detach from the processes.

In the parent we will detach then deallocate the memory. I was thinking about it, and I decided in my mind that if i deallocate that memory, then still try to point to it with my variable, I should get a segfault, guess what... I did, so that's how my program ends, with a seg fault, but it's on purpose, and I actually know why, and it just plain makes sense. Heres the output of each of the parts of my program.


Part 1
Fibbonacci with only forking
Part 2
Fibbonacci 2 with shared memory

Thursday, September 16, 2010

Kernel Modules

My ECE 437 class was assigned the monumental task of writing a filesystem driver for the linux kernel. I did a LOT of reading and finally started writing a few things, but realized I needed to be able to simply compile a kernel module just to see how to do it so I started following along with the kernel module how to here Kernel Module Tutorial

When I ran into the problem where when I called make, I would see the following error:
make[2]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.

I chased around the interwebs for a bit. I found out that it looks like $(PWD) wasn't returning the present directory, so I updated it to shell pwd per this site: Labjack Forums

Here is my makefile (note that in front of commands are TABS, if you replace them with spaces your makefile won't work, you've been warned)

#!/usr/bin/make -f

obj-m += hello_world.o

KERNELDIR=/lib/modules/$(shell uname -r)/build

all:
make -C $(KERNELDIR) M=$(shell pwd) modules

clean:
make -C $(KERNELDIR) M=$(shell pwd) clean




And finally here is my hello world (keep in mind it's pulled from the above tutorial)


/*  
 *  hello_world.c - The simplest kernel module.
 */
#include /* Needed by all modules */
#include /* Needed for KERN_INFO */

int init_module(void)
{
printk("<1>Hello world 1.\n");

/* 
* A non 0 return means init_module failed; module can't be loaded. 
*/
return 0;
}

void cleanup_module(void)
{
printk(KERN_ALERT "Goodbye world 1.\n");
}



Check it out. and give it a try. hopefully it works for you!

calling make all at the command line should compile it all,

and then a simple sudo insmod hello_world.ko

check out if your module was loaded via lsmod, look for it.

Now check your /var/log/messages file for your alert!

Finally do a sudo rmmod hello_world.ko to remove it from the kernel.

Thank you Caleb for the help various commands and the makefile!

Friday, August 27, 2010

Car, Mp3 Player integration

Anyone reading this that knows me knows I take forever to finish a project, in fact I have many projects that are in the slow (I mean glacier slow) process of being worked on.

I finally pushed myself to finish my mp3 player integration with my car, I had started this project probably 2 years ago easily. I, for the longest time, had wires hanging out from my console with a plug so I could plug in my iPod, also the ground was being run to my cigarette lighter.It looked TERRIBLE. I finally tore my console apart earlier this summer, and worked feverishly for a few weeks trying to get the USB port mounted, and then working on the audio jack. Summer classes began and I had no vent in the middle of my air outlet in my car so the air just blew anywhere it felt like. This killed my wife (not literally) as she tends to be colder then me pretty much all the time.  I finally kicked myself in the butt and realized that I wasn't going to get the USB working until sometime in the future, so I decided to just finish what I had so at least it looked nice.

I present to you the following:

While finishing up the cables from my cd player, I realized i needed some way to connect the two cables, I could use some kind of plug but while looking at my parts I realized I had RJ45 jacks and all I needed was a straight through network cable and I could connect through. To the left is the jack connected to the plug.

Here is the bottom side of the jack where I had to connect it through.

Here is the inside, I have the usb plug put in. I just need to build a charging circuit, and the actual audio jack.


And here is the whole thing connected up one last time before I put it all back together.










 Here it's in and I'm about to finish putting the faceplates back in.

 and finally I have the whole thing put together and running, it sounds good and looks pretty darn nice.
As a note I want to put here in case I ever have to look into this again, I have whiteblue and blue hooked up to the return, the green and whitegreen are the tape in, the brown is the ground, and when I plug the audio from my iPod in it goes to the blue, when it's unplugged the green/whitegreen combo are connected to the whiteblue/blue through the jack. 

If and when I ever build a tiny power supply and get my USB charging circuit going I'll be sure to let you know.

Friday, August 20, 2010

Rant about Schedules

So I have to rant here about UNM, for just a moment, So far I have had 2 semesters in a row (last spring and this summer) where I have registered for a class, with a TBD teacher. We found out the monday of the first week of class over spring, and found out a week early (I believe) that our summer class had changed times. If all I was doing was going to school, this probably wouldn't be a big deal, but like many others in the Engineering Program we have jobs, and finding out the day of a class that the time has changed (to earlier or later). is a HUGE hassle for people.

I just wish UNM seemed to understand it, I went to CNM for 3 years roughly, and don't recall this happening EVER, and I don't understand how a University can't plan classes that are reoccuring for a DEGREE program on a consistant basis. it just doesn't make sense....sorry for the rant but I had to put it out there.

This is my "theoretical" schedule, but if they change the two classes I have at the end of my tuesday and thursday, and monday wednesday courses I'll be hosed....standby we'll see what happens monday.


UPDATE: Well class has begun, and I'm honestly surprised. The classes times have not changed, I'm a little disappointed that the money being paid for a class to be taught by a instructor is being taught by a PHD student, BUT he seem like a good guy, so hopefully I'll get an opportunity to learn a bit off him.

Thursday, August 19, 2010

My 30 minutes

Ok I spent a little more then 30 minutes working and thinking about projects yesterday, as well as organizing my workspace, so I'll detail a little about what I did.

1. I got my Open Bench Logic Sniffer working, That was a HUGE hurdle, as I really wanted to use it for reading chips on my arcade to see that everything is working as planned.

2. I thought about how I can use my latching hall effect sensors. I wanted to build a gear indicator for my motorcycle, but thought I would need to buy a new set of hall effect sensors because i didn't research the ones I purchased well enough. (There is a lesson here, make sure you research what you're buying, this can save you time and money). For these hall effect sensors I'm going to figure out how much time removal of power will take to reset the sensor, then everytime I see a logic 1, I'll reset the sensor, it's not fancy but I think it'll work.

3. Cleaned up my workspace a little more again, put all my LED's in bins, as well as my resistors, rather then leaving them on the tape reels and baggies.

Also being without internet is rough, I now know I need to download all my datasheets for all my chips, sensors, etc. so when I'm home I can hook things up, not having things like my Quick Reference Guide for programming my PIC16f913 was a real hindrance to progress yesterday, maybe if I have a little time I'll get to play a little more tonight with it.

Tuesday, August 17, 2010

Getting Started

The Hardest Part
What's the hardest part of doing a project in your free time (especially when you're not a motivated person in general)?

Getting Started.

Over at the simple dollar trent makes the statement:
Big goals, big dreams. None of them will happen until I sit down and make the decision to get started with them. I can dream all I want, but until I get started, nothing will happen.
The Key
This is key to what I've said before about getting started, start spending time on what you're passionate about. Trent makes the challenge to go home and spend 2 hours on the big thing you're dreaming most about in your life.  This reminds me a lot about what my dad said about working on our backyard. Looking at it from the perspective of the whole project it looks like it's going to take a lot of work, but if I spend 30 minutes a day on it, you realize it goes a lot quicker then you really ever thought it would. The beauty of it all? It only takes 30 minutes a day. If you can't spare 30 minutes a day about something you really genuinely care and dream about, it really can't be that important to you.

Directing Focus
I like to think of it this way. I used to spend my "relaxation" time just watching tv. But I found myself getting more and more restless. Why? I don't care about watching TV, and unless I am specifically watching TV for a specific show, I just start to get mad at myself. I might complain because I have a bit of a belly, but I don't work out hardly ever. Bam 30 minutes a day, and I bet I could start to fix that. What is 30 minutes? 30 minutes is 2% of your day roughly. Start focusing your time on what you care about and you'll find you have more time. All it takes is a little bit of focused time each day. I truely believe that my "relaxation" time will become the thing I'm passionate about. and the more I

My Project
For my Car project I have some specific things I need to finish, but just getting myself up and doing them can be a challenge. So here is how I'll start finishing things, I'm going to map out what I have left and start making plans to complete each piece.

1. Program my PIC 18F4550 to determine if I can emulate a COM port. If not Use a 16F913, and use true RS232.
2. Using the PIC 18F4550, communicate with my CAN bus chips. (Or 16F913)
3. Find out the CAN messages that my car will produce when I press the song change buttons, as well as various other buttons. (Map out the entire CAN message structure if possible).
4. Hook up my USB port I installed in my car with the right resistances to charge USB devices.
5. Integrate iPod Touch Control with Microcontroller.
6. Use Messages determined in 3 to convert and send to my iPod with knowledge from 5.
7. Determine how to "trick" my tape deck into thinking it's got a tape in it but don't require the motors to be running. (prevents the terrible noise of the motors spinning).
8. Clean everything up and make it look professional. (Possibly cable channels or wraps to make the wires look clean.

School starts in about a week, so finding time is going to become challenging but I know that I can do it.

Wednesday, August 11, 2010

Google Voice Beginner

Well I went home to visit this weekend and my mom still had no idea what she was doing when it came to Google Voice, so I did what any good son should to and made a quick guide. This thing is by no means professional, nor is it even remotely perfect, but it was able to start her in the right direction again, so I am going to post it here for the benefit of others, I'll be updating it again as I get more questions.

Google Voice Beginner Guide V1.0

Thursday, July 22, 2010

Adventures in Prototyping a Board

So I'm working on a reconfigurable programming board for my microcontrollers.  Here is a quick shot of it.


So it's mostly a breadboard in some ways...LOL, but mainly I wanted the ability to have a ICSP connection and I was originally just going to directly connect it underneath to the right pins for the pic 16F913, but decided to just put a header on the other side of the ICSP header and then I can run wire and reconfigure it, as needed. This gives it a little more flexibility, and I don't have to disconnect and try to figure out which wires went where whenever I disconnect the ICSP header from the board.

The benefit to this is now I can program my Pic 16F684, and any other 28 or less pin PIC, I would like to add a power header to the board for additional hookup, but for now this will work I believe, and fortunately I will have the freedom to add to it as needed.

Parts required:
Perf Board from Radio Shack
Headers from Electronics Parts in Albuquerque
IC socket headers from Electronics Parts in Albuquerque
Solder (obviously....hmm wonder if we can come up with a solderless compound....ohhhh I like)

What if you put a lot of conductive material in a superglue form for example, you could "solder" by literally no heat....ok I'm talking crazy. Have a great day.

Friday, July 16, 2010

Setting up my Workspace

I have found that when I have to go to a new computer for work purposes, I have to re-setup a bunch of stuff. I also have scripts that I may have setup that point to drives by letter, maybe not always the best plan, but well I just get used to having things the same way. 

What ways do you achieve having the same desktop stuff setup when you move from computer to computer.

Here are a few of mine:

1. Setting up Shared Drives:

net use /PERSISTENT:yes U: \\drive1\folder
net use /PERSISTENT:yes V: \\drive2\folder
net use /PERSISTENT:yes Y: \\drive3\folder
net use /PERSISTENT:yes Z: \\drive4\folder
2. Registry updates to explorer menu.

3. I make shortcuts and save them on a shared folder on my computer, then just copy them to the desktop if needed.

I have more but they are very specific to where I work so they aren't too applicable to others here. Do you have any other ideas?

Of course these are specific to Windows XP in my case, but heck give me what you have for linux, apple, AND windows.



[Update]
Caleb says.... Remote Desktop..... <- Good call I forgot about that all together, in my case that doesn't really work as well, but for many this is a great solution.

Clearcase: Create A Label with a script

I got tired of looking up how to create a label in the rational documents and rather then going through type explorer, I decided to write up a really quick script. Maybe others will find use in it. Either way if I lose it, it's here for the world to find. It just uses standard commands that are found in the rational cleartool manual.


print "What Vob?";
$vob = <>;
print "What Label?";
$label = <>;
chomp($vob);
chomp($label);
print `cleartool mklbtype -nc $label@\\$vob`;
$asdf = <>;
Now I tried to make it so my context menu would be able to call it, but for some reason I can't make it call my perl script, if anyone has any ideas, please let me know and I'll update.

Wednesday, July 14, 2010

Past and Present 7/14/2010

Well it's been a while, and I better pop back in and say hi. This summer I've been taking Signals and Systems (ECE 314), and am doing an Independent study working on gridlabd with Pacific Northwest National Labs.

I learned a few very important lessons this summer.
1. DON'T PUT SPACES IN YOUR FOLDER NAMES.
2. Focus on one task until completion, jumping from project to project only results in many failed attempts.
[UPDATE]:
3. Test out parts before making them unrecoverable. I made a setup, then used Household GOOP on it to try to seal it, and when I went to use it, it didn't work, and the Goop rendered it useless.

School
I got with a classmate and am looking into working with Cosmiac on my senior project.  I'm not 100% sure what every detail will entail, but looks like a fun challenge, however it sounds like there might be more java involved then I really would like. Of course I'll keep you updated.

Car
Right now I'm trying to finish adding a usb power plug as well as an audio jack to my car, cleaned up finally, and I'm refusing to work on any other projects until it's done. Future plans include reading the CAN bus messages so when I press next on my steering wheel it will change songs on my iPod touch. I do plan on doing a writeup on how I put it all together.

Arcade
I actually finally got a chance to replace my fluorescent light (for the second time), this time I didn't drop the light at walmart before testing it out, now it finally works. Now if only I can finish my other projects and get in here and get it done, I would really like to get an O-Scope, and Logic Analyzer so I can do more testing but anything is possible.

Tuesday, May 18, 2010

Motivation

It's been a while, but then again, it's been a rough semester, I've managed to down 15 credits while working between 44 - 48 hours a week at work, not to mention spending time with my wife. 

So today's topic is motivation, what motivates you? In an attempt to keep each other motivated, one of my buddies and I are going to keep each other accountable. We've decided that for every 72 "failed" attempts at something, we are going to donate $1 per attempt to something we both decide on.

First let me define failed attempt. A failed attempt occurs when we say we're going to try to do something, but either don't even bother to get around to it, or we start but never really finish, I.E. start wiring up the circuit board, but then never finish the circuit.

Obviously we are trying to push past the passive barriers, now there are the occasional active barriers, such as not having parts, or the knowledge to perform a specific task, but we want that to have a minimal impact on such thoughts and ideas.

The way I see it, I have roughly 55-60 years in me left max (who knows I might get lucky and make it longer), and frankly I don't want to waste it. If all I do is watch TV all the time, or sit around and do nothing, what benefit does that give me, I'm simply taking up space, and not accomplishing anything, sure I work, and get stuff done that other people want me to, but I want to accomplish things that I want to.


I'm still learning what keeps me motivated, and how to ramp it up. As I learn what it takes me to do it, I'll stop in and keep updating.

Saturday, February 20, 2010

Pic 16F913 Quick Reference Guide

I wrote a short Quick Reference guide for how I have been programming the Pic 16F913.
Check out the HOW TO here: Programming_The_Pic_16F913_QRG

Good luck and let me know how it goes.

Its should be pretty straight forward.

Wednesday, February 17, 2010

Emulator

Well I finally came up with a good project for my ECE 335 course,

I attempting to write an emulator for the Power PC 403 for the Microprocessors course ECE344, I was wishing the whole semester for the opportunity to have something to test on at home, so when I came into school to test on the actual boards I'd be able to know that my program would work as expected.

In keeping with ECE 335 I'm sure I'll write some "terrible" code without realizing it, at which point, I'll just go ahead and optimize it, this will have to be a really quick deal so initially I'm only going to support the addi command. Once that is up and working I'll reassess what is going to happen next.

The link to the project is here if you're interested in helping let me know.


Thursday, February 11, 2010

Counting

This is the VHDL for the counting algorithm from ECE 528 today.



Monday, February 8, 2010

Finding Bugs

So I was working with a buddy on a program he wrote in Assembly, he had nearly the whole thing complete, and before he's able to actually test it, he did one of the smartest things I can recommend if you can't actually test the code until some future date.

HE ASKED SOMEONE ELSE TO TAKE A SECOND LOOK.

Better then just asking someone else, asking someone else who has a better, even if it's slightly, knowledge of the subject, can see things that you might not see.

Now sure sitting in front of the computer with the board next to you and assembling, loading, running, then going back to debug can gain you some invaluable troubleshooting experience. I won't lie to you, learning how to attack a problem can be invaluable, but one of the biggest key's to do that follows.....

The key for the second person here, is to guide the programmer to the problem spot without giving away the answer if they know it.

Why so? By forcing the person to look at the code EXPECTING a problem they're going to start analyzing each and every line, Is it the right command here, did I set that up right, did I move this pointer to the right spot. EVERY LITTLE DETAIL should get scrutinized by the programmer. And that is good, they'll learn TONS and begin to see the big picture here.

Once you code something up, re-read it, re-read it again, now compare it to your design.

Wait a second I snuck something in there didn't I?

It comes back to design huh. IF every piece of the code you wrote can be traced back to a design element you wrote, you can break the problem, if there is one into a tiny piece, and that's a huge factor when you're working with 1k+ lines of code in assembly.

It might not seem to make sense working with a 50 line piece of code, but if you can force the habit it will make you a better programmer. I promise!

Sunday, February 7, 2010

The PIC 16F913

So I bought some PIC 16F913's I was hoping I could just literally plug in the PIC to the PicKit 1 and just program, turns out it's not that simple, but aside from hooking a couple wires up, well frankly it's not that hard. I just wired up the appropriate VSS, VPP, VDD, and ICSP Clock and Data lines.

One thing that threw me off, is that the microchip site said that the PicKit 1 programs the P16F913, this isn't "entirely true" I was able to use ICSP. Since I can't get MPLAB to program via ICSP, I was able to using the PicKit 1 Classic program, found on microchips website.


Here were my steps:
  1. Hooking up the ICSP. I actually tried to do a "read" with the PicKit 1 Classic S/W, it recognized that it was a 913 AWESOME, this is really good news.
  2. Load up a program into MPLAB and compile, turns out I was able to use the exact same "hello world" code from my 16F684, so I just compiled and was ready for the next step.
  3. I then pointed to the hex file compiled by MPLAB, from within the PicKit 1 Classic program.
  4. I just hooked up the appropriate pins to the LEDs on the board to make sure i was able to turn the LED on and off, if the S/W was working as I expected.
There you have it, it wasn't nearly as hard as I expected it to be, now that I can use the PIC16F913, well frankly I am pumped, the only thing I would really like to do is have a socket plug that I can use to directly wire up a ICSP port, then I can really just use a ICSP plug on any device/board and I "think" I can actually use it.

Next up is maybe serial communications? We'll see the sky's the limit now.

Friday, January 22, 2010

Networked memory

I just read an interesting article about how slime mold generates networks as efficient as the Tokyo Subway system, the only downfall looks to be related to redundancy.
Slime Mold Subways

Which get's me thinking, now that memory is a dime a dozen, can we have networks of the same data, and depending on where you are in the platter for example rather then having to travel say all the way across the platter to get the information, you can just stay in the local vicinity?

So Suppose you have the same data being transferred back and forth in different memory regions so they are all matching. Your head is already in a particular location of the platter, now rather then having to say move the head all the way from where it is to a location nearly opposite the location you currently are, there is a networked memory piece just a few micrometer's next to, or after what you're looking at. Now the disk doesn't need to seek as long, which tends to be the more time consuming part of data access.

Let me know what you think or do you think I'm off my rocker?

Monday, January 11, 2010

Deleting Files

I was having problems with a particular file, one of my scripts accidentally produced a file named such that I couldn't delete it.
I found a great tip here: Forum Post

All I had to do was find the filename using dir /x /a

Once i found that a simple del filename got rid of it.

Saturday, January 9, 2010

Analog Inputs

I've been fighting since late last night trying to get analog inputs working on my PIC16F684.

I finally got somewhere this evening, oddly enough for some reason, in some regions of the pot it goes really quick then just a small bit over will slow it down drastically.

All my code does is initialize everything to setup RA0 as an analog input, then it turns on the ADC waits until it's done then toggles the LED and waits the amount of time in the combination of ADRESH and ADRESL, all I had to do was put ADRESH into the integer value I had, shift it 8 positions left, then or the ADRESL in, then pass it to my wait routine.

Outside of that it's finally working, the last hiccup I had was well frankly I forgot to turn it back on after trying turning it off as a troubleshooting measure. Of Course I'll continue to plug VERSION CONTROL, had I gotten this working and decided to play a little here and there to make it say be more sensitive, I may have done myself in by messing something up, now I have no fear of that.

I am posting the code on my SVN server, and one day would like to be able to make that public so everyone can get to it, but I suspect my ISP won't like me using a web server out of my house, so I'll for now plan to upload it to Google Docs.

Below you'll find the vid of the PIC Kit 1 in action with the LED's toggling quickly then as I rotate the pot it slows down.


Here's the code to do it, there may be some unneeded stuff, let me know if you see anything off!

For the sake of testing I uploaded this file to YouTube and am going to see what the difference in appearance is here!


Thursday, January 7, 2010

Opening Mailto in Gmail in XP

One of the first things I did when I bought my netbook was to download chrome. Now I haven't actually clicked a mailto link until today, and guess what happened? Internet explorer in all it's glory opened up. I didn't like that. One of the solutions I found was to look for URI.mailto or something to that effect in the file types menu of an explorer window and make some changes there, but well I didn't like that method much and I couldn't find what they were talking about in the first place.

I started searching for the term mailto in the registry, and I came upon this line right below.

HKEY_CLASSES_ROOT\mailto\shell\open\command

Unfortunately I deleted the original line so if anyone has it I would really like to know what it originally said, but none the less I have the line to insert if you want Chrome to open up gmail and insert the mail address!

This brings me to my next point ALWAYS BACKUP YOUR REGISTRY in case you muck something up.

I changed the key
to the below (change out onaclov for your username) and you should be set to go! Of course if you want to use another type of email client and/or browser you're going to have to change a few things. Basically all I'm doing is calling the chrome application, and passing the gmail address with mailto and URL %1 passed to it. The ideal way would be to call the default browser

"C:\Documents and Settings\onaclov\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --app=https://mail.google.com/mail?extsrc=mailto&url=%1

Additional Notes:
Oddly enough I found that if I go to IE and click options and then programs it only shows Outlook Express and Windows Live Mail which I initially thought was the culprit and in some ways it might have been, so I did a search for Windows Live Mail.

I found this:
As you can see it looks like mine has an entry for GMAIL, which of course is completely incorrect
as I was testing some things out trying to get it to work, if you add a Key there and name it whatever you name it, when you go to IE and Tool Options and Programs and Email you'll see those entries the problem is I have/had no idea what to put in there which lead me to the initial piece of the post finding mailto.

If I had the original mailto contents I "might" be able to remember what that was doing and possibly setup the entry on the left (HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail) to actually open whatever browser you want as well as whatever email client you want based on that location (rather then having to keep entering in the registry if you decide to change).

Well if you have any other items of note please let me know.

Good luck

Wednesday, January 6, 2010

Interrupts

In ECE 344 we learned about interrupts and how to use them, of course we were programming in assembly, so we had to setup our interrupt vector, then write some code at the appropriate offset.

That turned out to be pretty easy, but the problem is let's say we want to write some code in C and try to handle interrupts. This is a little tricky if you don't have all the information you need.

Well of course since I can't seem to think logically sometimes, I didn't look at any manuals and just headed over to stackoverflow.com, where I got some great answer's here: Interrupts

The simple answer was this:
void interrupt my_interrupt_handler (void) {
handle_interrupts_here();
}
I did some testing and once I had the right bit's turned on I just ended up in my interrupt routine with this (about 90% borrowed from here:Microchipc):
void interrupt isr(void)
{
if (T0IF)
{
TMR0=TMR0_SETTING;
T0IF=0;
RA5=1;
//code right here is executed every 800us
}

My newest project I'll be working on with this microcontroller is to find some way to create a simple serial interface which I can transmit and receive a piece of data. Since I can interrupt on a timed interval. I should be able to read data passed at an expected rate.

I'll keep you updated when I get more work done.

Sunday, January 3, 2010

SVN

So today I would like to go over the importance of version control.

Take for example I was working on a program, I made some changes and it was working. Now rather then checking in my file and version controlling it, I just started modifying it. About half ways through I realized I meant to re-save the file somewhere but instead overwrote the changes that I had originally working.

When you've gotten a particular program working at some point, if you're dedicated enough to stick to version control, you check it in, then keep working, now if you have made changes and wish to revert to a previous working state it's REALLY EASY. Now of course simple enough you can just save multiple copies of a file, and keep renaming it and everything else. If you use version control you really only "see" one file and you just keep checking it in.

I have SVN setup on my server, and am using Tortoise SVN for my window's machine, and am enthralled with it. When you do a checkout in SVN it ends up copying the checked out folder into your current directory. Now when you make changes it shows a different icon on the folders so you can visually see that it's needing to be committed. Now if you're working with multiple machines/people you will want to make sure you update before commiting.

Once you've committed changes you're set.

Good luck and let me know if you need any help setting up your very own SVN server.

Max RPM II

Well I finally got a few minutes to mess with my arcade after cleaning the garage a bit.

So far I have the lights on the coin op working, the flourescent light doesn't fully light, so I need to find out if it's the wattage or what. The monitor doesn't turn on at all, and the speakers just give a hum. I have to assume that the system isn't "booting". I found a site I can use to help me with questions here: Arcade Museum

I have 120V going to my monitor and have checked a few IC's on the Turbo Cheap Squeak.

In the hopes of using another computer monitor I tried hooking up the Horizontal sync to a regular CRT, and the monitor said the frequency wasn't correct. So at this point I'm assuming that it's a no go on that CRT.

I'll post updates as they come along. Have fun!

Thursday, December 31, 2009

Timed Shot Photos

So my original goal for this project was to take some pictures of the mountains at pre-determined times. I found that this might be useful in other cases as well, so I'm going to be building an enclosure next and allowing maybe a tripod screw mount.

S/W Requirements:
1. Set a period (eventually elsewhere, but for now in code)
2. Turn Camera on
3. Once camera's stabilized take a picture
4. Turn camera off.
5. Lather, Rinse, Repeat.


Here's some footage.

Tuesday, December 22, 2009

What is a web browser?

In commemoration of my 100th post, I decided to do a video post. Here I give a rough overview of what a web browser is. I'm sure it'll need more work, but hey it's a first and I just put it together with movie maker through windows.

The inspiration for this post was my mom, I was attempting to set her up with Google Voice, and when I was needing to get her to get on the internet she asked me "You mean click aol?". Unfortunately I suspect very strongly that my mom thinks that aol is the internet, and there are alot of people out there that think the same thing. Sit back relax, and hopefully I'm at least somewhat entertaining.



Once you've finished watching let's re-iterate what I'm trying to get across.
1. Web browser's are not the internet.
2. Web browser's are the vehicle that get's you to web pages.
3. You aren't stuck with only one web browser, you can try other ones.
4. Things you want to keep in mind are speed, real estate, following standards, usability, popups, and addon's.

Tuesday, December 15, 2009

Help Joe get an iPod touch

I posted a site joe.onaclovtech.com, hopefully I can get alot of people to donate a little, and we'll all get Joe an iPod touch.

Thanks anyone that helps out.

#joesipod

Monday, December 7, 2009

Clonezilla

Well I finally went about the task of imaging my hard drives.

I decided to use CloneZilla, as I read from lifehacker this would be best as well as a few light searches on the net seemed to refer alot to CloneZilla.

I ran into some problems, there is a USB helper that they recommend, that wouldn't boot my SD and/or my USB thumb drive.

I basically had to use Unetbootin, the nice thing is you can point to the .zip file you download from clonezilla's website and it treats it just like it's an image file and builds everything up for you on your drive.

Once I got that all working there were a couple more things I ran into. I'm assuming that my wifi wasn't going to work with this light "OS" so after a few tries I finally hooked into ethernet.

Once I got past that I found out that it was expecting a folder called partimag on the home directory, so I had to make that folder.

I also ran into problems when trying to specify my samba server, if I just pointed it to my ip address it seemed to have problems, so I actually pointed it to ip\folder, and that worked.

From there it was literally a cake walk.

Wednesday, December 2, 2009

Google Voice Ideas

I was logging into google voice again, and found myself in a familiar world. I send a text message, and when the person replies it's in my inbox AND my phone. The problem is, I have one of those crappy phones so I have to constantly be deleting messages because I run up to the limit.

Here's my thoughts, if you get a text message in Google Voice AND you're logged in, it gives the text message say 1 minute to sit in the inbox doing nothing, if you immediately respond INSIDE google voice, it doesn't bother sending it to your phone, additionally you could add a "send to phone" option for a text, then it will still send it to your phone in the event you're getting directions and you won't have internet access when you leave your computer.

Well there you are just one more idea.

Thursday, November 26, 2009

Troubleshooting

One of the biggest challenges in ECE 344 is troubleshooting on the system.

I mean walking through typing stp, then rrd when you want to read the registers.

In comes typical troubleshooting without a debugger, normally you stick some print statements in there and wait for the print fest to begin.

This bothered me because we can't really do this in our architecture very easy. The nice thing is that we learned about sub routines, and you can treat sub routines as functions if you do it right, so what did I do?

I wrote a sub routine that will print the register values at the time you branch and link, the main limitation, is that interrupts can change your register values once you've entered into the subroutine. This is where the mailbox architecture comes in, if you design your system so that the interrupts do as little as possible and leave everything as untouched as possible, you can then go into your print subroutine and it will print the register's last value.

There are probably plenty of other uses you can find for this routine, and maybe even better ways to use it, for example when you enter this subroutine it waits for a key press before you can exit. Once that happens you can return from your branch and link, this is great because now you don't just blow through your whole program before even really seeing anything.

This is untested code as I am unable to make it to the school until Monday at the earliest, but if you want to give it a try I'll link to it at the bottom.

Changes you'll want to make to allow this to integrate with your program is finding your location in memory you can stick the long ascii string I've built.

Additionally you'll need a 32 bit to ascii converting branch and link, which i haven't written, but we have written for our latest program. This will convert the actual register values to a printable value, as well as you'll need a push and pop routine at the beginning and end, with the pointer jumping by 40 each time, if you don't have this you'll have to find a way to get the data from the register's instead of memory as I'm doing.

As I have time I'll upload more files and a more complete solution but this is very far along and should only require small amounts of modification.

NOTE: As with any file you download from google documents, unfortunately just directly downloading it will have format issues. Copy and paste the contents to a new file and save as a .s file, otherwise you'll be chasing your tail trying to find problems that really don't exist.

Check out the code here: Print Function

Friday, November 20, 2009

Thoughts on OS's

So here are my thoughts on os's these days.

I just recently got my new HP netbook. It's a great little device, but here's my worry, it's not very powerful and it's running windows, My old laptop is running windows as well and is slowing to a crawl.

What are some common causes of slowed down computers?
From Computer Hope:
Hard disk drive is short on available disk space.
Several software programs have been installed/uninstalled leaving behind bad files and/or confusing the software.
Data Corruption.
Outdated drivers
Computer is overheating.
Corrupt OS.
Bad Hardware.


It would appear there are two common causes here.
1. The hardware capability is declining.
2. Operating System related errors.

Hold up before you start getting all upset and claiming that if the people who wrote the programs cleaned them up right then you wouldn't have these problems.

What I want to know is why these programs are becoming so integrated with the OS that the OS can't simply clean itself up?

I was watching the Google OS talk as well as reading a little on it. One of the things I noticed and it's becoming a bit of a theme across OS developer's now a day's.

Let's build OS's that are designed for specific hardware and really only market for that.

What I'd really rather see is OS's that when you load them up will look at all hardware connected and self configures itself to be the most optimal OS for that hardware. What this means is now instead of having 300 print drivers loaded into your system and 45 wireless network card configurations, the OS looks at what you have and decides what's best and get's rid of the rest. Typically true hardware to the system should have only those drivers loaded, no more, no less.

I know this sounds crazy and in some ways it is, but what happens next is the OS is also linked up with the web, so let's say you plug in a new hardware item a new sound card, a new stick of ram or something. Things might be a little hokey but with a basic set of drivers that will control (in a limited way) most hardware, you now tell the computer to rescan for system updates, at which point you can optionally load the new driver's for this new device onto your system, and again it re-configures itself to run as optimally as it can with this system.

What can this mean for boot up times? Well if the OS doesn't have to constantly be verifying what equipment you have and assume you just plain have it and go forward from there. If/When it runs into a hiccup such as it expected a stick of ram somewhere and didn't see it, it jumps to the degraded mode until you either update and "auto" re-configure the system or repair the problem.

I think if you can resolve hardware checks as well as re-design the bootup to start simultaneously kick off processes that will help considerably.

Once more, you won't have to constantly be pinging the devices (wasting power) just verifying that the components are there.

Tuesday, November 17, 2009

Syntax

Syntax doesn't require a whole lot of explaining. Mainly get a good source of information that you can understand, in this case we really only get a .pdf file with the reference manual so you really need to make the best of it.

In our "compiler" the system converts the assembly code that you wrote to a 32bit instruction.
This instruction can be analyzed by the student by breaking it down into opcode, from there that will tell you what kind of data can reside in the rest of the instruction.

One thing I'd like to do is write a syntax checker for the PPC 403 that we're using. This would be particularly helpful in writing code off site, and then making sure the syntax is right.

Once you can sucessfully "compile" then you're on to the testing, and possibly will return to this section.

Let me know what you think!!

Google Voice Screwups

This is a pretty hilarious site, they allow anyone to post google voice to text translations which many times turn out to be quite hilarious.

http://gvscrewups.blogspot.com/

Now here's my question some people post the "before" and after versions, is it possible to improve the translator's capabilities knowing this information?

Check it out and let me know what you think.

Wednesday, November 11, 2009

Google Voice

I just ran into another situation where Google can integrate their google voice application into, Google Maps!

I was searching for my doctor's office, it brought up an address and phone number, why not have a clickable link for those logged in that have GV, and they can click call this number and select which phone to ring, OR even text message address/directions to myself....

Just another little idea for the wide world of google voice

Concepts, the Leonardo of Programming

If you don't understand "what" you're trying to do, it's going to be very difficult to write code and/or tests for it.

Learning concepts can be difficult, some of the main things you need to think about "conceptually" is breaking any task down into 3 parts,
  1. Initialization
  2. Code that does the actual work (algorithm)
  3. Exiting
For initialization you can look most of the things up in the user's manual, once you know how to setup the actions you will be using, you can then begin to look at what you're actually wanting to do, which brings us to algorithms.

Algorithms are "how" you're going to accomplish the task you're attempting to complete. My favorite method is drawing it out in a flowchart design. But I have to "see" what I'm doing and that's one way of doing it, once you've managed to really nail this idea down, you can frequently just do it in your head, and reserve doing flow chart's for the more difficult designs that you really can't wrap your head around.

If you don't know your algorithm it's much like trying to write a paragraph about a subject that hasn't been given to you, you'll keep writing and rewriting your paragraph until you finally get the subject, but that doesn't seem very efficient now does it? Figure out your subject (or what you're trying to do) and THEN write the paragraph, much like figuring out your algorithm FIRST then code up the solution, this prevents large quantities of re-writing code.

Finally when you've finished your task, are there any "clean up tasks" that you need to complete? Do you need to return the register's to their original values? Do you need to clear out memory so that another operation doesn't accidentally use data you've shoved out there? Do you need to pop the stack? These are all things you need to answer when you've finished the task your algorithm is attempting to complete.

Tuesday, November 10, 2009

School Reports

What's wrong with School reports today?

Frequently we are told you need X number of pages, so you push and pull at your words to try to force as many as you can out, many times rather then a clear and concise report you end up sometimes obfuscating ( to be evasive, unclear, or confusing) things.

When will it become clear that writing shorter reports that convey the information required are better then long drawn out reports that are 90% bloat and 10% real information?

Looking at Needless words I started thinking about this, I don't know how many reports this semester alone I've written that are really just bloated with meaningless information, in a simple attempt to pass as a "useful" paper.

When will engineering students write reports as clear and concise as the work we will need to produce?

I have read requirements documents that are so indirect that it's a wonder how people can implement them, and in fact I was once told that if they didn't understand the requirements they were writing that well, they would write it more then once in a couple different ways, so as to give them an "out" when the software comes that they can say "this isn't what I meant" and force you to change it.

That's a tough paragraph to read. Re-Worded: If you don't understand the material you're writing about, make it so the people that are reading it can't understand it.

Start writing what you MEAN. Stop writing bloat into your reports. I'm going to give this a try on my next Microprocessors report, I'll let you know what kind of score I get.

No one likes bloat. Me least of all.

Sunday, November 8, 2009

Designing Learning

In today's day and age, is the current methodology of teaching the best approach?

Here's my hypothesis, Changing HOW we are taught can net greater results on a broader spectrum of students.

It's a well known fact that there are different types of learning
from: LD Pride
These Learning styles are, Auditory, Tactile, and Visual.
How can we improve each of these area's in today's classroom?

I believe that if a student doesn't "care" about what they're learning, it's like trying to force oil to mix with water, it doesn't work.

What we need is something that will be the go-between from the oil (the student) and the water (the material). One way to do this is by not stifling creativity, and in fact fostering it, the best engineers in my opinion are the ones who find the most creative solutions!

Point in case, I'm working on my microprocessors class. Right now we are learning how to handle interrupts, using timer's, buttons, led's and various other things. Individually these projects are dry and don't inspire creativity.

My solution suggests that the student attempts to create a game in one case. For example, Simon Say's, a great game, could be a pretty easy one to build, but in building that you learn a lot of things, here are many of them I can think of:
  1. LED Outputs
  2. Pointers
  3. Timer's
  4. Interrupts
  5. Button Presses
  6. LCD (maybe give the user a score?)
  7. Stack
  8. Algorithms
So I could manage to learn all those things and actually have fun doing it.

I am so far having a blast with the class because I can SEE the potential I'm given while learning this information, but many people see it using blinders, where they can only see what's directly ahead of them, and not see the potential, I believe that letting student's pick projects force them to learn how to design a project, work through the team building details, and the final implementation. I don't think this should be a one time project that is part of graduating, but shoot find a project that the student needs to complete that takes each piece, and as you learn, you can build more and more.

For example, let's say you're given a project as a freshman, some of the techniques to build this project may require math level x (doesn't have to be overly difficult), as you push through each semester you can learn more and then literally apply it to a project as you go along, so when you finish your degree you can say...Look I completed this project and it required knowledge and skills in all these area's.


How do you think learning should be implemented in today's day and age? And do you have any ideas for programming that may induce learning indirectly?

Thursday, November 5, 2009

Design and Programming..a Love affair

Let's take a look at design.

If you design your project well, looking at all possibilities up front without coding a single thing you can catch some problems up front that you may run into. One of those may cause messy or unneeded code! That's again the beauty of the artist they can choose whether they want to keep repainting the exact same thing or really go out there and paint something new!

What all can be designed?
For Microprocessors where you have a limited number of register's to use, defining a personal/project standard allows greater code re-use, as well as less code and easier to understand code.

If you define a register as the UART pointer from the beginning and make sure not to change it, you won't have to constantly be re-writing the code to setup a pointer. How many times does that have to happen? Well if everytime you have to drop into your interrupt service routine and determine whether it was a RX or TX bit that sent you running, that's 2 times for every "interrupt". I know it doesn't sound like alot of time, but when you run into a situation where your time is critical, 2 instructions can make that difference.

The short time that it takes to design your project, can multiply the rewards exponentially.

Deciding how you want to setup each module is part of design, would you rather setup the entire initialization in your main routine for each module, and let that handle everything OR modularize everything and put ALL uart related items in the UART section.

This brings up the good point of .include files, by putting all your setup into a .include file, you can now start using that file in new projects and rather then constantly having to re-write a subroutine you just write it once, and any improvements you make are better for all programs, (provided they are in fact better). Writing this I already see a flaw in the design of the program we made in our latest lab!

Guess what? Looking back on it, I realize we have a file called variables that contains the ".set" items that point to the UART and all other associated names, this means that every file that I try to .include the UART routine into has to have the entire variables file included, Guess what we did that with a "register setup file too!!!".

How can this be improved?

I can put all registers that the UART EXPECTS to use in it's .include file as part of the initialization, and make sure that any time I use that file those particular register's are in that state before the subroutine is used, this can occur by pushing the register settings to the stack before any updates to them, then reverting them back, will allow the subroutine to keep using them as expected.

If there is one thing I'll stress, Try to make your code as uncomplicated and easy to understand for yourself and others, Implementing a design can aide in that.

Let me know how you design!!

How to Microprocessor

Recently we were given a lab in microprocessors that requires us to handle alot of interrupts somewhat simultaneously.

For someone that walks into this lab unprepared it can look like a lot, but for some that's a challenge and for other's that's an active barrier, rather then choosing to be prepared for it, you just walk through and hope for the best.

Reading manuals on the syntax or basic tools to use while programming the microprocessor can be boring, and often time's it's easy to forget about what you just learned.

How do you approach a problem like our latest lab (or any other programming project for that matter)

1. Design --You need to know the "picture" you want to paint with your code.
2. Concepts -- You need to know "how" painting that picture can be accomplished
3. Syntax -- You need to know how to "paint" that picture.
4. Testing -- You need to know how to tell if the picture "looks" like you want it to?

I think those are the 4 most important concepts of programming that really need to be understood.

I'm going to post a series of posts about these particular topics!!

Defining Moment

What's your defining moment?

At what point in your life did you decide, enough talking about doing something and literally start doing it?

What pushed you over that edge?

I feel like many times I talk and talk about doing something but never end up really doing it, which is why in some deep recesses of my heart and mind I started this blog. I got tired of talking about all the stuff I "want to do" and started doing them. Don't get me wrong, I've got along way to go before I feel like I've had that "defining moment".

I've done a few things in my life and when I talk about things I'd like/am doing, I suprise other classmates, they're amazed that I do some of the things I do, but then again I talk to classmates and I'm amazed at the things they're doing, it's because when you get into that "routine" of it's just what you do, you forget how special those qualities are.

Keep pushing yourself to your limits and it'll payoff, everyone's defining moment is different, one man's trash is another's gold. Just because the things you do don't sound interesting to you anymore, or 'special', don't forget that it's someone else's gold.

If you have the opportunity to really connect with people and you can mentor someone else interested in what you're doing, do it by all means, you might be that person that pushes someone just that much closer to a defining moment.

Sometimes I think that my Mountain talks with Phil helped push me over that edge, when I came upon the epiphany of the Guitar Hero Challenge, That's when I realized I can do so much more when I push myself to that limit, and I'm fully capable of it too, I just have to realize that excuses are what sometimes consumes us. Being able to understand the difference between an active and passive barriar and how to hurdle it is the biggest part in learning who you are.

Good luck finding that defining moment, and I encourage you to keep pushing on towards it, you may one day look back and realize that your moment occurred and you didn't even notice it.

Monday, November 2, 2009

Google Calendar

Short "rant/post" today about GCal

Google really needs to add a feature you can say that the weekend after date x is the weekend event x occurs.

For example my wife and I went to volleyball on our first date, it was the 7th, so I would be interested in setting an event reminder that will remind me to look up the schedule on the weekend before (or after) the 7th and see if there are any games we can attend.

I think it would be nice to allow not date specific (or day specific) recurring events, but rather recurring events that can be determined easily based on the calendar date of that year....

Just and idea. Let me know what other features Google Calendar should add to their Gcal

Monday, October 26, 2009

Frugal Programming

I was reading the article on msn here
It goes on to talk about wants vs needs, if you want something now what are the chances you'll want it in a year.
I was suddenly struck with the thought, what about "frugal programming" what i mean is, how do you decide what you NEED programs for and what you WANT programs for.

Lets break it down, sometimes I'm doing something repetitive and think I need a program, but in order to write this program it'll take say 4 hours to write and 2 hours to run, but just doing the actual work would take 4 hours.

Which is more valuable? Being able to complete the repetitive task in an efficient manner makes it more of a benefit. In addition getting more practice will definitely make you a better employee.

The problem is you look at it as a "right now" situation. The fact is you need to finish this task as quickly as possible, and you just get something working for this situation and forget about it.

What often happens is you write a program (such as the one above) for a one time task, but you never label it and stick it somewhere that you KNOW you'll find it in the future. Now that time you spent was more in the direction of wasted. Because if the task comes up again you'll either have to spend an hour searching for the program, or you'll have to spend the time re-writing it.

So what I'm trying to say is being a frugal programmer is being a programmer who can reuse what they do in as many way's as possible as to get as much value out of the "item" as you can.

If you don't have some sort of organization you'll forever be repeating work and doings over and over again until you finally sit down and say I'M GOING TO GET ORGANIZED and literally do it.

So far I've been working on a form of organization, it's tough though, because I might write one thing in C, one in perl and another in visual basic, but I have no means of correlating what they are to it. All my programs are stuffed in a folder called programs, and sorted by language.

I just recently came up with a plan (literally about 12 seconds ago), if I put a list of keywords that this particular program could be used for, or describing it in the header, I can write a script that will find all keywords and programs, so if I do a search I might be able to find things quicker.


Until I literally implement it, let me know how you organize your information/programs/data.

First Hosting

Where was your first webpage ever hosted?

With the news that Yahoo has finally killed off GEOCITIES, I immediately recalled 8th grade and sitting in front of the old macintosh's in the library at school using the blink tag and animated gifs.

I still use angelfire, but that's for the time being.

Let me know what you use(ed), and your best gif!!

Wednesday, October 21, 2009

Arcade Challenge: Max RPM Pt I

So I was going to garage sales last saturday and I picked up this beauty.

Its called Max RPM, by Bally Midway, it appears to have been released in 1986.

What I was told by the previous owner is that he received it as part of payment of a debt from someone. He was told it worked, and it turns out it didn't work.

I decided this would be my "car" Man Project. You know how guys have that car or woodworking project in the garage to work on when they need some time alone, this will be mine.

The Arcade came with the schematics needed to get all the wires hooked up right and working.

First I powered it up just to see if it worked, the screen powered up but no video, so I needed to investigate.

When I opened it up I found a few things.




This board wasn't hooked up whatsoever and it looked important.






When I looked around a bit I found this mess, looks like someone cut off the connector. It's ok I have the schematics, I decided that rather then wait around for a connector (Ok, too impatient because I thought this might be the only problem) I soldered them on to the male pins of the board above.

Well I have power going to the boards and I can even hear feedback on the speakers.

Next I wanted to tackle the lights in the front, I really like the $.25 lights because they just remind me of playing in the arcade when I was growing up, once i got power going from the above work, I measured and it looked like there was 14V across the bulbs, thinking that most cars were similar I found some car light bulbs that looked pretty close and plugged them in and Voila we were in business.

So what it looks like I have left for this project is outlined below:
  1. Coin return has cut wires
  2. Credit button has cut wires
  3. Florescent tube doesn't appear to be operational
  4. CRT doesn't display anything or appear to power up.


I also found some tokens in there as well as the key and lock to the back of the unit, the guy i bought it from lost the key to the front so I had to remove it from the inside, I can get it replaced when I finish up, but no sense in doing it until I'm ready.



Total Costs involved:
Purchased for....$10.00
Fuses.............$02.50
-------------------------
$12.50

I'll keep updating costs and detailing what I find out as I go along, keep following as I finish this project.

If you know anyone who has an Arcade that doesn't work that would like to get rid of it, maybe I'll be able to feature it here!

Thursday, October 15, 2009

Google Contacts

How can google make their contact manager more useful for their users (especially Google Voice users)? I have some ideas. Here they go:
  1. Shareable groups (I.E. business and spam numbers for example)
  2. Lookup of your number to see who has your number in their contact list.
  3. Blockability of your number from any and all contacts in Google.
  4. For Phone Type it should be labeled Landline and Mobile.
  5. If you want to list the Attributes/keywords of a number allow that, (kinda already the "groups thing"
  6. Reverse Phone number lookup across the board, you know google has all that data (most likely) already, why not make it easier. I don't mind a couple ads while I'm trying to find out who just called me.

Let me know what you think. Do you have any better ideas for Google to use for their contacts manager?

Thursday, October 8, 2009

Programming Club

So I read a comment on Jeff Atwoods blog someone made that said
First rule of programming is you DO NOT TALK ABOUT PROGRAMMING.

I got to thinking sometimes working quick on your feet can help you improve your skills
so I looked up the "rules of fight club" which I found here: Rules of Fight Club

So I'm thinking heck why not start a "programming club", you come in and program against one other person. So I'm rewriting the rules for programming club here they are:

1st rule: You do not talk about programming club.
2nd rule: You DO NOT talk about programming club.
3rd rule: If someone says "I can't solve it" or passes out, the match is over.
4th rule: Only two people code at a time.
5th rule: Only one match at a time.
6th rule: No books, No internet.
7th rule: Matches will go on as long as they have to
8th rule: If this is your first night at Programming Club, you HAVE to program.

So the question is Who's in? I'm in the Albuquerque NewMexico area, lets get this started.

Go to my Contact Me Page and lets get started! Contact Me

Coding Frustration

First, the reason I posted this is because I can't actually comment on the post by Jeff Atwood here:
Coding Horror

What I would like to comment on as well is finding your bugs, or not even so much as bugs as problems in your pseudocode. I'll be the first to admit that more often then not I would rather sit down with the idea in my head and just code it up, and to be honest at this point in my programming career I have been able to do that quite easily. The problem comes when you start hitting harder and harder blocks of code that you need to build and generate.

I know there's been a few times I've been banging my head on a wall trying to get a particular piece of code to work. When I finally have "given up" and go to another engineer to explain the problem, MID SENTENCE I stop and say "wow I'm retarded" followed by, there is the problem, and most of the time the other engineer didn't even get a chance to say something.

What does that tell you? Recall that sometimes learning things requires more then once sense? I have found that occasionally hearing the pseudo code that I've written can often times improve my understanding of the problem I'm trying to solve, or even the implementation I'm using to solve it.

In fact, sometimes even attempting to blog about the problem brings about different ways of looking at the problem, take a look at my problem where I wanted to grab filenames from selected files!

Windows Selected File Names pt I Posted: Thursday May 28th
Here my solution was to take any particular selected file and simply append it to the clipboard. The problem with this one is it ran the script the same number of times that there were files, this isn't a very efficient way to solve this.


Windows Selected File Names pt II Posted: June 8th
Here my solution required a "copy" to the clipboard, then right clicking on one file and running the script. I still believe there are too many steps, but it's more efficient (I suppose for smaller files but larger sets) to simply copy the file to the clipboard then using the clipboard contents extract the filenames from the path.


Windows Selected File Names pt III
Someday I would like to have a pt III that shows how to use the "currently selected items" that I KNOW has to exist in windows and simply right click and that will determine the filenames, in my opinion that will be the best way to do it.


I had been mulling part 1 over for a while, and finally when I got a working solution, I wrote it up, and not 11 days later I managed to find another (and better IMHO) solution and get it working.

Give it a try next time youre having problems debugging or finding a good algorithm, use another sense.

Let me know how it works out!

Wednesday, October 7, 2009

Microprocessors 10/1/09 -> 10/7/2009

Here are the in class examples that we've covered in class since the 28th

Revised Blink LED's

Branch And Link

Fibonacci using Stacks

Good luck and let me know if you have any questions!