Difference between revisions of "Robot Club"

From Mech
Jump to navigationJump to search
Line 2: Line 2:




Install the USBTinyISP driverfrom [https://learn.adafruit.com/usbtinyisp/download https://learn.adafruit.com/usbtinyisp/download].
Install the USBTinyISP driverfrom [https://learn.adafruit.com/usbtinyisp/drivers https://learn.adafruit.com/usbtinyisp/drivers].





Revision as of 20:39, 5 November 2014

Files for the programming tutorial: nurobotics_tutorial.zip


Install the USBTinyISP driverfrom https://learn.adafruit.com/usbtinyisp/drivers.


Download and install Arduino from http://arduino.cc/en/Main/Software. Run the program to see how it looks. Open an example from

File->Examples->01.Basics->Blink.

All Arduino code has two main functions: setup() and loop(). In Blink, setup() makes pin 13 an output, and loop() makes an LED on pin 13 blink once per second. We'll go over it in more detail. Close the program for now.


We are programming a slightly different chip, so download the extra parts file from

https://github.com/damellis/attiny/ (Download ZIP button).


Unzip the folder, rename it "hardware" and add it to the folder ...documents/arduino/.

The RGB LEDs on the tutorial board use a special library called "Neopixel." Download the Neopixel library from


https://github.com/adafruit/Adafruit_NeoPixel


Unzip the folder, rename it "Adafruit_NeoPixel", and add the folder to ...documents/library/ (library might not exist, so make it there)


Tasks:

Edit the tutorial example files to:

  • Read the push button, turn the RGB LEDs on and off
  • Read the push button, toggle the RGB LEDs on and off
  • Read the push button, use Delay() to make a blinky pattern with the RGB LEDs