Skip to content

Instantly share code, notes, and snippets.

@branliu0
Created August 1, 2012 18:47
Show Gist options
  • Save branliu0/3229723 to your computer and use it in GitHub Desktop.
Save branliu0/3229723 to your computer and use it in GitHub Desktop.
Asana Learning Lunch: Arduino 08/01/2012

Learning Lunch: Arduino

Overview of Arduino

  • interaction with physical world
  • microcontroller board
  • development environment
  • open-source!

Comparison vs other microcontroller platforms

  • Inexpensive (relatively)
  • Cross-Platform: Many other microcontroller systems are Windows only
  • Open-source software and hardware

Arduino Uno

  • ATmega328 running at 16MHz
  • 14 digital IO pins (of which 6 have PWM output)
  • 6 analog IO pins (10-bit Analog-to-Digital converter)
  • USB connection
  • power jack
  • reset button
  • 32KB of Flash Memory (0.5KB used by bootloader)
  • 2KB of SRAM
  • 1KB of EEPROM

Basic API:

  • pinMode
  • digitalWrite (any of the digital pins)
  • analogWrite (from one of the PWM pins)
  • analogRead (from pins A0-A5)
  • delay (in milliseconds)

Examples

Blink: https://gist.github.com/3229696

Fade: https://gist.github.com/3229698

Potentiometer Input: https://gist.github.com/3229691

Shift Register: https://gist.github.com/3229681

http://arduino.cc/en/Tutorial/ShiftOut

Easy Starter Project Ideas:

  • Use a potentiometer to control a servo
  • Use a potentiometer to control a piezo element
  • Use a light sensitive resistor to control a multi-color LED
  • Get a motor running with a transistor, controlled by a flex potentiometer!

Important Concepts

  • Analog vs. Digital
    • Analog: A continuous function
    • Digital: Approximation of a continuous function with discrete values (resolution) at discrete time intervals (sampling frequency)
  • Ohm's Law
    • Voltage = Current * Resistance
  • Voltage Dividers (just to understand potentiometers)
  • Pulse Width Modulation (PWM)
    • Achieve analog communication over a digital channel
    • Switching rapidly between low and high
    • Duty Cycle: Proportion of time that signal is high

Resources

Software Download: http://arduino.cc/en/Main/Software

Arduino Reference: http://arduino.cc/en/Reference/HomePage

Arduino Tutorials: http://arduino.cc/en/Tutorial/HomePage

Arduino Playground Resources: http://arduino.cc/playground/Main/Resources

Inspiration

8x8x8 LED Cube: http://www.youtube.com/watch?v=GUcX41pokZY

IDEO Arduino: http://labs.ideo.com/category/arduino/

Arduino Blog: http://arduino.cc/blog/

40 Projects: http://hacknmod.com/hack/top-40-arduino-projects-of-the-web/

Laser Harp: http://www.youtube.com/watch?v=sLVXmsbVwUs&feature=player_embedded

Other

LittleBits: http://littlebits.cc/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment