This week's assignment required that we take a deep dive into programming the board we had created in week 5 containing a button and the LED. I thought (based on my programming experience and my relative ease of programming Arduino) this would be a walk in the park... I could not have been more wrong. Originally I wanted to write a simple Morse Code translator for any string and have the LED flash out that Morse string, so I wrote a simple C code to do it. I have some syntax errors here, because of my python background, but in theory it should work.

AVR Button Code. Language: C

First thing to do is echo the board to see if we can get a response. Need to know that everything is working properly. This code was borrowed from Neil's: "hello.ftdi.44.echo.c". Language: C

Diagram for the ATtiny44.

AVR Button Make File. Language: C

First attempt is to install WinAVR with AVRDude, but I couldn't find a clear communication channel. I found out I had soldered the LED's backwards, and one of the traces didn't get milled properly, so I had to break off the LEDs and resolder them back on and cut a partition where one was missing. The FabISP and the FTDI were both connected and Windows recognized everything, but I couldn't get anything to talk, or find a place where I could dump code.

Morse Code Light Blinker. Language: C

So I fired up the Arduino IDE and loaded my libraries and encountered my first problem. The library I needed couldn't be found.... Shit.

...Yes I realize the irony here that the monkey is pounding an Apple machine, and my problem is entirely Windows....

Ok so there has to be a workaround.... I installed Atmel studio and started to get to work trying to communicate with the board. No luck here....

Last step: try to load all the libraries and fire it through Git. Couldn't get a response here either. This is probably why all those people buy Raspberry Pi's and Arduinos. I had to load mountains of garbage onto my machine just to try to talk to a simple AVR, when I could have just spent some cash for a preconfigured thing that works out of the box. I don't know. Seems like a more elegant solution that requires less investment. I must have loaded all the libraries about 5 or 6 times in various locations and still couldn't get anything to recognize anything.... (Seriously, after the semester, I'm probably going to have to spend weeks purging all the duplicates in my system).... Short of dual-booting Linux and stuffing all the code down the AVR's throat with Terminal, I couldn't find any sort of solution to this problem. Windows represents the largest market-share of computer users, and I believe things should be designed with Windows in mind. And although I embrace the open-source community, this process was not intuitive at all and still required that I find a Linux box to dump my code through.... But....
I WANT TO BELIEVE!!

Well. Shit.

Video. I finally figured out what went wrong after testing with a multimeter. Some of the traces underneath the ATTiny44a weren't milled correctly. So I pulled the Tiny up and hacked at the traces until I had what I wanted. I made a mistake cutting the traces by hand and had to solder in a jumper wire. But I finally got the thing running. Thank GOD. This was giving me a headache for about a month.... I also had to install Linux on a spare machine I had laying around to be able to push code to the thing. The combination of all of the above and the help of the lab gurus (thanks Rob) made it possible for me to finally figure it out. More to come...