Input Devices Mar 27

Though seemingly simple, this week had a lot of ups and downs for me.  Our task was to mill a board that we could then turn into an input device.  There were lots of options for us, and I originally decided to try three different boards:  The hello light, the hello reflect, and the hello mic.  (I've got some new ideas for a final project that will definitely involve input of both sound and light information).  

The first part of the project involved downloading the board files from the Fab Academy server, and then running the modela through Fab Modules.  Despite the fact that we have done this several times now, I had a lot of trouble with this.  My first board, hello light, shown below, worked like a charm.  

I next tried to mill the hello.reflect board.  I ran into tons of trouble.  Fab Modules kept freezing up, causing me to have to restart the whole program, re-move the bit each time, and the few times that I actually got it to run it either cut the traces too shallow, leaving lots of copper bridges, or it just completely cut in the wrong place.  I lost multiple boards to this problem while trying to cut out the board.  Eventually I got something that might be passable, but I'm pretty skeptical of some of the traces.  

The hello.mic board saw the exact same types of problems.  It took me 6 different tries of opening fab modules, it freezing, and then me trying again to get a board.  I pushed through and got these two guys here:

The next step I was obviously dreading the most: soldering.  I've had tons of trouble with this in the past, so I finally decided to watch a tutorial online (as my colleagues were little help other than saying my soldering looks like a 4 year old did it... or was it 4th grader... not sure, but either way they were right, and I needed to work on it).  It actually went a ton better this time.  Practice is starting to help a lot.  Only a few minutes and NO solder burns later, I had the hello.light board ready.

I decided to try to get this one working before soldering my other boards just to make sure everything was good.  It was not.  At this point I ran into a lot more problems with the program.  I downloaded the make and c files for the hello.light from the Fab server.  I then attempted to "Flash the Microcontroller" but kept getting an error that said 

"avr-gcc -mmcu=attiny45 -Wall -Os -DF_CPU=8000000 -I./ -o hello.light.45.out hello.light.45.c

make: avr-gcc: Command not found
make: *** [hello.light.45.out} Error 127"

I never was able to resolve this on my computer, but by switching to a different computer I was able to successfully verify the bites of flash and the terminal even thanked me for doing it.  Hooray.

The next step was to run the program.  As of 3/28 I have not been able to successfully do this with the hello.light board.  The error message I keep getting says "Permission Denied."  Knowing very little about this I'm not sure if this is a problem with something I have done, or (another) issue with the fact that I am using a school computer and don't have certain access rights.  I will continue to work with my colleagues to try to get this resolved.  In the mean time, I'm going to try to solder the other two boards and see if I can get them to work.  More updates coming soon.

4/1 Update:  No April fools here, I have gotten my hello.light board to work!  Not sure of the why/how but my colleague Brad Seehafer showed me how to fix the error I was getting.  I typed " sudo chown :stoughton /dev/ttyusb0"  It asked me for our school password, and once satisfied the bar measuring the light input showed up!  Red for less light, blue for more light.  Not sure what the units on this are, but I was again thrilled to have a working input device.  

Feeling awesome with the success.  Going to try the hello.reflect now.

Flashed the Microcontroller as before with "sudo make -f hello.reflect.45.make program-usbtiny"  All went smoothly and when I went to run the python with "python hello.mic.45.py /dev/ttyUSB0" the program with the three bars opened up and I thought success!

As you can see, however, all three bars show the same reading and the light does not turn on.  I'm guessing this is a hardware issue rather than a software.  This was the board that I had the most difficulty milling and there was some suspect traces.  I'll try to inspect my hardware.  In the meantime, I might try to make the hello.mic board quick and see if I can get that program to work.  If I update again, you'll know I was successful, if not, 1 out of 3 ain't bad right?

 

4/2 Updates:  I got the hello.reflect working (sometimes).  The problem does seem to be hardware related as when I hold it in certain positions it works great, light on, bars changing, but if I move it slightly it loses functionality.  As I've done all I really can in terms of re-soldering, I'm guessing the issue may be with my wires that connect to the fabISP as wiggling that guy is really what produces the biggest effects.