arduino(1)

Upload: john-leung

Post on 15-Oct-2015

13 views

Category:

Documents


1 download

DESCRIPTION

Arduino(1)

TRANSCRIPT

  • 5/26/2018 Arduino(1)

    1/33

    Arduino

    A free development system based on AtmelAVR 8 bit microcontrollers.

    LB8X Tom

  • 5/26/2018 Arduino(1)

    2/33

    What is AVR

    RISC architecture microcontroller Designed for high level languages, developed in

    Trondheim, Norway in 1996

    Classic: AT90S1200, AT90S2343, AT90S2313,

    AT90S4433, AT90S8515, AT90S8535

    ATtiny22, ATtiny25-85, ATtiny2313 ...

    ATmega8, ATmega16, ATmega 48-328 ...

    Flash programmable memory

    ATmega self programming

    RAM, EEPROM and peripherals

  • 5/26/2018 Arduino(1)

    3/33

    What is Arduino

    Open Source Hardware, you can make your

    own board, or buy one.

    Cheap, easily available.

    Open Source Software.

    Very widespread, many projects openly

    available.

    Extra HW (shields) available.

  • 5/26/2018 Arduino(1)

    4/33

    Arduino Duemilanove (2009)

  • 5/26/2018 Arduino(1)

    5/33

  • 5/26/2018 Arduino(1)

    6/33

  • 5/26/2018 Arduino(1)

    7/33

  • 5/26/2018 Arduino(1)

    8/33

    Arduino Uno

  • 5/26/2018 Arduino(1)

    9/33

    Arduino Mega 2560

  • 5/26/2018 Arduino(1)

    10/33

    Original Arduino with RS-232

  • 5/26/2018 Arduino(1)

    11/33

    Arduino on breadboard

  • 5/26/2018 Arduino(1)

    12/33

    Arduino Nano

  • 5/26/2018 Arduino(1)

    13/33

    Ardweeny

  • 5/26/2018 Arduino(1)

    14/33

  • 5/26/2018 Arduino(1)

    15/33

  • 5/26/2018 Arduino(1)

    16/33

  • 5/26/2018 Arduino(1)

    17/33

    Arduino IDE

  • 5/26/2018 Arduino(1)

    18/33

    Arduino Language

    C like syntax, but simplified

    Abstracts the pin naming to numbers

    Trades efficience for ease of use

    Easy to learn, yet powerful

    Lots of example code

    Easy to reuse C-code from other projects

    Libraries can be written in C++

    Lots of libraries available

    i t l dPi 13 // LED t d t di it l i 13

  • 5/26/2018 Arduino(1)

    19/33

    int ledPin = 13; // LED connected to digital pin 13

    // The setup() method runs once, when the sketch starts

    void setup() {

    // initialize the digital pin as an output:

    pinMode(ledPin, OUTPUT);

    }

    // the loop() method runs over and over again,

    // as long as the Arduino has powervoid

    loop()

    {

    digitalWrite(ledPin, HIGH); // set the LED on

    delay(500); // wait for half a second

    digitalWrite(ledPin, LOW); // set the LED off

    delay(500); // wait for half a second

  • 5/26/2018 Arduino(1)

    20/33

    BascomAVR IDE

  • 5/26/2018 Arduino(1)

    21/33

    BascomAVR Language

    Structured basic

    Uses AVR pin naming

    Easy to learn, yet powerful

    Very efficience, and compact Can use inline assembly code

    Built in simulator

    Lots of example code Must have paid version to make libraries

    Lots of libraries available

  • 5/26/2018 Arduino(1)

    22/33

    BascomAVR advantages

    Free demo version, up to 4kB code

    Supports most AVRs

    Commercial version is inexpensive

    Excellent support Active community

    Supports bootloaders

    Supports many programmers Can work with AVR Studio

    $ fil " 8d f d t"

  • 5/26/2018 Arduino(1)

    23/33

    $regfile = "m8def.dat"

    $crystal = 16000000

    Led Alias Portb.5 'Arduino digital pin 13

    Config Led = Output

    Reset Led 'Turn off LED

    ' Main program

    Do

    Waitms 500

    Toggle Led

    Waitms 500

    Toggle Led

    Loop

    End 'End program

  • 5/26/2018 Arduino(1)

    24/33

    Prototype shield

  • 5/26/2018 Arduino(1)

    25/33

    Proto shield w/mini breadboard

  • 5/26/2018 Arduino(1)

    26/33

    Ethernet shield w/micro-SD reader

  • 5/26/2018 Arduino(1)

    27/33

    Argentdata radio shield for APRS

  • 5/26/2018 Arduino(1)

    28/33

    Extreme shield stacking

  • 5/26/2018 Arduino(1)

    29/33

    Bluetooth to TTL 5V module

  • 5/26/2018 Arduino(1)

    30/33

    USB to TTL module

  • 5/26/2018 Arduino(1)

    31/33

    RS-232 to TTL module

  • 5/26/2018 Arduino(1)

    32/33

    Approximate pricing eBay

    Arduino Duemilanove $25

    Proto shield from $5

    Ethernet shield $18

    Bluetooth module $17

    USB to TTL module $5

    RS-232 to TTL module $6

  • 5/26/2018 Arduino(1)

    33/33

    Resources

    www.atmel.com/avr www.avrfreaks.net

    www.arduino.cc

    en.wikipedia.org/wiki/Arduino www.mcselec.com (BascomAVR)

    www.argentdata.com

    www.ebay.com

    www.sparkfun.com