Input Devices

Since I wanted to practice playing with input devices that I might use in my final project, I decided to build the step resonse and phototransistor sensors. Milling and stuffing the boards went relatively quickly, but programming took the longest so I'll focus my discussion on programming the board with the FABISP and running the python code.

I had ambitious plans of quickly making the two hello boards and then attempting to make a miniature version of the board for my final project. However, after many hours and a lot of help from programmers, I ended up with only a working hello.load.45 board. I programmed the boards using the Mac OSx terminal. I downloaded the .c, .make, and .py files and saved them in a different folder for each board. After plugging in the FabISP and the board, I navigated to the folder and ran the make programs using the terminal.

cd ~/Desktop/hello.light
make -f hello.light.45.make
make -f hello.light.45.make program-usbtiny

With the phototransistor circuit I was getting a "Double check connections error" probably due to a incomplete solder joint, which I will continue to debug later. I tried again with the hello.load.45 board and was able to successful load the program.

I then downloaded the pyserial code, found the name of the usb serial port by typing "ls /dev/tty.*", and ran the command to run the python program.

python /dev/tty.usbserial-FTF61DID

I ran into more errors. The python GUI would open but then it would freeze, as if the program was waiting for an input. I ran Neil's program and got the response: "device reports readiness to read but returned no data (device disconnected?)." Since the problem seemed to be in the microcontroller, I de-soldered the component and replaced it with a new one. This was a successful fix, the program returned pin values and the program ran. However, it seems to update the values slowly, maybe adjusting the code would improve performance. For the final project, my next steps will be to de-bug the phototransistor circuit and explore if there is a way to combine input devices in order to capture information about where the pieces are located on the board and what type they are.