i n t e r f a c e P r o g r a m m i n g
My first goal for this week was to fix my week10 accelerometer board. After doing as much as possible on the first accelerometer board (replacing components, cutting off shorts, and adding jumper wires) I redrew the board and milled with larger traces. Below are all the boards I milled, not pictured is the terrible vynl cut attempt. I also used the heat gun to remove and re-use component like the capacitors and headers when possible.
It was programmable and gave serial output! But it was still crashing the example python program. I tested everthing against the working ATTiny45 accelerometer example board to confirm the problem was with the new hardware and not the software. Upon close examination of the C code and the hex output in Coolterm, Rob helped point out that it was not outputting the 00 01 02 03 04 used to indecate the start of data. With the oscilliscope he discovered the ATTiny 44 board serial output was 8 times as fast as the ATTiny 45 board's. This indicated a clock problem. I must have set the fuses wrong, so we changed the clock divider to 8 instead of 1. I have been trouble-shooting this board for a week so I was beyond excited to see the correct hex output.
Finally onto interface programming, the actual assignment for this week. I did a bit in both Java and Python in Processing but switched to running Python in the terminal. Although Processing is easier and friendlier, it uses a lot of libraries that that also abstract (i.e hides)what the code is actually doing. I altered the sample code to have a box move with the microcontroller. It's simple and a bit laggy but compared to how hopeless this week started off, it was thrilling to see the little box on the screen wiggle.