Learning Examples | Foundations | Hacking | Links
See the foundations page for in-depth description of core concepts of the Arduino hardware and software; the hacking page for information on extending and modifying the Arduino hardware and software; and the links page for other documentation.
Simple programs that demonstrate basic Arduino commands. These are
included with the Arduino environment; to open them, click the Open
button on the toolbar and look in the examples folder.
- Blink: turn an LED on and off.
- Blink Without Delay: blinking an LED without using the delay() function.
- Button: use a pushbutton to control an LED.
- Debounce: read a pushbutton, filtering noise.
- Loop: controlling multiple LEDs with a loop and an array.
- Melody: play melodies with a Piezo speaker.
- Analog Input: use a potentiometer to control the blinking of an LED.
- Calibration: for analog sensor readings
- Fading: uses an analog output (PWM pin) to fade an LED.
- Smoothing: smooth multiple readings of an analog input.
- ADXL3xx: Read an ADXL3xx accelerometer.
- Knock: detect knocks with a piezo element.
- Memsic2125 : two-axis acceleromoter
- Ping: detecting objects with an ultrasonic range finder
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.
Examples from the libraries that are included in the Arduino software.
- Knob: control the shaft of a servo motor by turning a potentiometer.
- Sweep: sweeps the shaft of a servo motor back and forth.
- Motor Knob: control a stepper motor with a potentiometer.
For a huge list of examples from the Arduino community, see the interfacing with hardware page on the playground wiki. Also see the list of old examples.