warning: Creating default object from empty value in /home/dr_rick/onearmedman.com/modules/taxonomy/taxonomy.pages.inc on line 33.


Knight Lights

Knight Lights

Other Cool Stuff

  • Math
    • max, min, contrain, randomSeed, random
  • Time
    • delay
      • important for adding pauses

Tutorial 1: Data and Serial

Arduino Hooked UpArduino Hooked UpNow we'll run the knight_rider_1 tutorial. Open up the files in the zip archive. All you need for this is to plug in the Arduino to your computer.

Once the board is plugged in, hit reset on the board, then click the Upload to I/O icon on the Arduino interface. Once that's done, click the Serial Monitor icon to see the numbers move up and down. Now you're talking (to the Arduino!)

Arduino Hooked Up

Arduino Hooked Up

Digital Read/Write

  • pinMode
    • takes the pin to be determined
    • takes the mode -> in or out
    • MUST do this for most pins. Forgetting this will get you in trouble

Control structures

  • if/else
    • simple branching
  • switch case
    • more complicate branching
    • for multiple cases

Data Types

  • numbers
    • byte 0 - 255
      • space saving! use this when possible!
    • int
      • handy for negative numbers and most other uses bigger than a byte


  • Voltage and Logic
  • Digital "Voltage"
    • LOW is 0V
    • HIGH is 5V

Arduino Coding Session

Today, we will run through the basics of Arduino programming. To follow along, please go to the reference section of the Arduino site and step through the functions as we go.

Also, download the files below. They are the Arduino code examples we'll follow once we start making real circuits.

The Phone and the Tool

The Phone and the Tool

Today, we're taking apart a toy cell phone. All you need, really, is a screwdriver.

Copyright Mike Edwards 2006-2009. All content available under the Creative Commons Attribution ShareAlike license, unless otherwise noted.

Syndicate content