Week Nine

Embedded Programming

This weeks assignment is to program the hello button board in as many languages as you can. I programmed the board using the Arduino IDE. I opened the Button sketch from the examples menu and changed the pin designations to match the pins on the "Hello Button" board. The "buttonpin" changed from pin 2 to pin 3 and the "ledpin" changed from pin 13 to pin 7. I then selected the ATtiny44 (external 20 MHz clock) from the board menu. I selected the USBtinyISP programmer from the tools menu and uploaded the sketch to my board. When the sketch was "Done uploading" the led on the board lit up. When I pushed the button it turned off. In an effort to make the board a little more exciting I modified the sketch and initially set the ledpin low. Then made it go high when the button was pushed. Yeah it worked but still not very exciting. Blinking led's are way more exciting so I decided to make it blink. After setting the ledpin high I added a delay of 1000 ms. Then I set the ledpin low and added another 1000 ms delay. I uploaded the new sketch and it was still not very exciting. In a last ditch effort to make myself say "wooow!" I reduced the delays to 100 ms. Uploaded the sketch again and now when I press the button my led flashes quickly instead of the slow boring blink. I think that is about as exciting as it is going to get. This is my Final sketch and it is way more exciting than just a button that turns on an led.