Arduino Part 1 Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion
What is a Microcontroller • A small computer on a single chip containing a processor, memory, and input/output • Typically "embedded" inside some device that they control a microcontroller is often small and low cost. www.mikroe.com/chapters/view/1
What is a Development Board • A printed circuit board designed to facilitate work with a particular microcontroller. • Typical components include: • power circuit • programming interface • basic input; usually buttons and LEDs • I/O pins
Arduino Types • Many different versions – Number of input/output channels – Form factor – Processor • Leonardo • Due • Micro • LilyPad • Esplora • Uno
Arduino Uno Close Up • The pins are in three groups: – Invented in 2010 – 14 digital pins – 6 analog pins – power
6 Arduino Uno • Microcontroller: ATmega 328 • Operating Voltage 5V • Input Voltage (recommended) 7-12V • Input Voltage (limits) 6-20V • Digital I/O Pins 14 (of which 6 provide PWM output) • Analog Input Pins 6 • DC Current per I/O Pin 40 mA • DC Current for 3.3V Pin 50 mA • Flash Memory 32 KB (of which 0.5 KB used by bootloader) • SRAM 2 KB • EEPROM 1 KB • Clock Speed 16 MHz
• Flash memory is a non-volatile memory chip used for storage and for transfering data between a personal computer (PC) and digital devices. It has the ability to be electronically reprogrammed and erased. It is often found in USB flash drives, MP3 players, digital cameras and solid-state drives. • Static Random Access Memory (SRAM) is a type of RAM that keeps data that's fed to it without having to be refreshed over and over again. • EEPROM (electrically erasable programmable read-only memory) is user-modifiable read-only memory (ROM) that can be erased and reprogrammed (written to) repeatedly through the application of higher than normal electrical voltage.
The Arduino Development Board Making-robots-with-arduino.pdf
Applications • Light control • Motor control • Automation • Robotics
Arduino IDE(Integrated Development Environment)
Terminology
Digital I/0 pinMode(pin, mode) Sets pin to either INPUT or OUTPUT digitalRead(pin) Reads HIGH or LOW from a pin digitalWrite(pin, value) Writes HIGH or LOW to a pin Electronic stuff • Output pins can provide 40 mA of current • Writing HIGH to an input pin installs a 20KΩ pullup resistor. • (In electronic logic circuits, a pull-up resistor is a resistor used to ensure a known state for a signal. ... In this case, when the switch is open, the voltage across a pull-up resistor with sufficiently low impedance vanishes to the effect that it looks like a wire to VCC.)
Arduino Timing • delay(ms) – Pauses for a few milliseconds • delayMicroseconds(us) – Pauses for a few microseconds
IO Pins
Digital? Analog? • Digital has two values: on and off • Analog has many (infinite) values • Computers don’t really do analog, they quantize(approximate by one whose amplitude is restricted to a prescribed set of values). • Remember the 6 analog input pins. todbot.com/blog/bionicarduino
Bits and Bytes
Example • Complete the sketch (program) below. • What output will be generated by this program? • What if the schematic were changed? 

Introduction Arduino uno

  • 1.
    Arduino Part 1 Topics: Microcontrollers ProgrammingBasics: structure and variables Digital Output Analog to Digital Conversion
  • 2.
    What is aMicrocontroller • A small computer on a single chip containing a processor, memory, and input/output • Typically "embedded" inside some device that they control a microcontroller is often small and low cost. www.mikroe.com/chapters/view/1
  • 3.
    What is aDevelopment Board • A printed circuit board designed to facilitate work with a particular microcontroller. • Typical components include: • power circuit • programming interface • basic input; usually buttons and LEDs • I/O pins
  • 4.
    Arduino Types • Manydifferent versions – Number of input/output channels – Form factor – Processor • Leonardo • Due • Micro • LilyPad • Esplora • Uno
  • 5.
    Arduino Uno CloseUp • The pins are in three groups: – Invented in 2010 – 14 digital pins – 6 analog pins – power
  • 6.
    6 Arduino Uno • Microcontroller:ATmega 328 • Operating Voltage 5V • Input Voltage (recommended) 7-12V • Input Voltage (limits) 6-20V • Digital I/O Pins 14 (of which 6 provide PWM output) • Analog Input Pins 6 • DC Current per I/O Pin 40 mA • DC Current for 3.3V Pin 50 mA • Flash Memory 32 KB (of which 0.5 KB used by bootloader) • SRAM 2 KB • EEPROM 1 KB • Clock Speed 16 MHz
  • 7.
    • Flash memoryis a non-volatile memory chip used for storage and for transfering data between a personal computer (PC) and digital devices. It has the ability to be electronically reprogrammed and erased. It is often found in USB flash drives, MP3 players, digital cameras and solid-state drives. • Static Random Access Memory (SRAM) is a type of RAM that keeps data that's fed to it without having to be refreshed over and over again. • EEPROM (electrically erasable programmable read-only memory) is user-modifiable read-only memory (ROM) that can be erased and reprogrammed (written to) repeatedly through the application of higher than normal electrical voltage.
  • 8.
    The Arduino DevelopmentBoard Making-robots-with-arduino.pdf
  • 9.
    Applications • Light control •Motor control • Automation • Robotics
  • 10.
  • 11.
  • 12.
    Digital I/0 pinMode(pin, mode) Setspin to either INPUT or OUTPUT digitalRead(pin) Reads HIGH or LOW from a pin digitalWrite(pin, value) Writes HIGH or LOW to a pin Electronic stuff • Output pins can provide 40 mA of current • Writing HIGH to an input pin installs a 20KΩ pullup resistor. • (In electronic logic circuits, a pull-up resistor is a resistor used to ensure a known state for a signal. ... In this case, when the switch is open, the voltage across a pull-up resistor with sufficiently low impedance vanishes to the effect that it looks like a wire to VCC.)
  • 13.
    Arduino Timing • delay(ms) –Pauses for a few milliseconds • delayMicroseconds(us) – Pauses for a few microseconds
  • 14.
  • 15.
    Digital? Analog? • Digitalhas two values: on and off • Analog has many (infinite) values • Computers don’t really do analog, they quantize(approximate by one whose amplitude is restricted to a prescribed set of values). • Remember the 6 analog input pins. todbot.com/blog/bionicarduino
  • 16.
  • 17.
    Example • Complete thesketch (program) below. • What output will be generated by this program? • What if the schematic were changed? 