Learning   Examples | Foundations | Hacking | Links

Arduino Tutorials

Here you will find a growing number of examples and tutorials for accomplishing specific tasks or interfacing to other hardware and software with Arduino. For instructions on getting the board and environment up and running, see the Arduino guide.

Examples

Simple programs that demonstrate the use of the Arduino board. These are included with the Arduino environment; to open them, click the Open button on the toolbar and look in the examples folder. (If you're looking for an older example, check the Arduino 0007 tutorials page.)

Digital I/O

  • Blink: turn an LED on and off.
  • Button: use a pushbutton to control an LED.
  • Debounce: read a pushbutton, filtering noise.
  • Loop: controlling multiple LEDs with a loop and an array.

Analog I/O

  • Analog Input: use a potentiometer to control the blinking of an LED.
  • Fading: uses an analog output (PWM pin) to fade an LED.
  • Knock: detect knocks with a piezo element.
  • Smoothing: smooth multiple readings of an analog input.

Communication

These examples include code that allows the Arduino to talk to Processing sketches running on the computer. For more information or to download Processing, see processing.org.

  • ASCII Table: demonstrates Arduino's advanced serial output functions.
  • Dimmer: move the mouse to change the brightness of an LED.
  • Graph: sending data to the computer and graphing it in Processing.
  • Physical Pixel: turning on and off an LED by sending data from Processing.
  • Virtual Color Mixer: sending multiple variables from Arduino to the computer and reading them in Processing.

Other Examples

These are more complex examples for using particular electronic components or accomplishing specific tasks. The code is included in the tutorial.

Miscellaneous

Complex Sensors

Sound

Interfacing w/ Hardware

Tutorials

Tutorials created by the Arduino community. Hosted on the publicly-editable playground wiki.

Interfacing With Hardware: Code, circuits, and instructions for using various electronic components with an Arduino board.

Interfacing with Software: how to get an Arduino board talking to software running on the computer (e.g. Processing, PD, Flash, Max/MSP).

Code Library and Tutorials: Arduino functions for performing specific tasks and other programming tutorials.

Electronics Techniques: tutorials on soldering and other electronics resources.

Manuals, Curricula, and Other Resources

Arduino Booklet (pdf): an illustrated guide to the philosophy and practice of Arduino.

Learn electronics using Arduino: an introduction to programming, input / output, communication, etc. using Arduino. By ladyada.

  • Lesson 0: Pre-flight check...Is your Arduino and computer ready?
  • Lesson 1: The "Hello World!" of electronics, a simple blinking light
  • Lesson 2: Sketches, variables, procedures and hacking code
  • Lesson 3: Breadboards, resistors and LEDs, schematics, and basic RGB color-mixing
  • Lesson 4: The serial library and binary data - getting chatty with Arduino and crunching numbers
  • Lesson 5: Buttons & switches, digital inputs, pull-up and pull-down resistors, if/if-else statements, debouncing and your first contract product design.

Example labs from ITP

Spooky Arduino: Longer presentation-format documents introducing Arduino from a Halloween hacking class taught by TodBot:

Bionic Arduino: another Arduino class from TodBot, this one focusing on physical sensing and making motion.

Examples from Tom Igoe

Examples from Jeff Gray

Share