Arduino Basics Connect Arduino to USB port Open the Arduino folder on the desktop Run arduino.exe Tools/Port/select the one that says (Arduino) File/Examples/01.Basics/Blink Ctrl-U (Upload) and wait... Watch the LED blink :)
What does this code do? /*.....*/ or //...... are comments (ignored by the Arduino) void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); }
Main Loop void loop() { digitalWrite(LED_BUILTIN, HIGH); // LED on delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // LED off }
Preparing to Control the HexBug File/Examples/12.HexBug/Init Ctrl-U Connect the HexBug remote to the Arduino
Preparing to Control the HexBug File/Examples/12.HexBug/Init Ctrl-U Connect the HexBug remote to the Arduino Slide the HexBug's power switch to 1 or 2, depending on the number on the back of the remote control Note that the HexBug times-out after a while, so it it's not responding, try turnint it off and on again
First HexBug Program File/Examples/12.HexBug/KBTest Ctrl-U Tools/Serial Monitor Type f b l or r (forward backward left or right) and hit ENTER The HexBug should respond accordingly
Other Programs Try other examples in 12.HexBug (Code1-Code7 are described in the handout)