實驗物理技術:2009/02-06
登入

Learning   Examples | Foundations | Hacking | Links

Examples

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.

Basics

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.

Digital I/O

  • 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 I/O

  • 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.

Sensors

  • ADXL3xx: Read an ADXL3xx accelerometer.
  • Knock: detect knocks with a piezo element.
  • Memsic2125 : two-axis acceleromoter
  • Ping: detecting objects with an ultrasonic range finder

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.

Libraries

Examples from the libraries that are included in the Arduino software.

EEPROM Library

  • EEPROM Clear: clear the bytes in the EEPROM.
  • EEPROM Read: read the EEPROM and send its values to the computer.
  • EEPROM Write: stores values from an analog input to the EEPROM.

Servo Library

  • Knob: control the shaft of a servo motor by turning a potentiometer.
  • Sweep: sweeps the shaft of a servo motor back and forth.

Stepper Library

  • Motor Knob: control a stepper motor with a potentiometer.

More

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.


0最後修改紀錄: 2009/03/17(Tue) 09:16:49


尚未登入. (登入)

since 2011/06/20 18:23