3. Arduino Is…
• An open-source electronics prototyping platform
• Based on flexible, easy to use hardware and software
• Intended for students, designers, hobbyists, and others
• Able to receive input from sensors
• Able to send output to lights, motors, and other actuators
4. Why use Arduino?
• Inexpensive
• Cross-platform
• Simple programming environment
• Open source and extensible software
• Open source and extensible hardware
5. Basics
• Programming language is based onWiring
• Development environment is based on Processing
• A program in Arduino is called a Sketch
• Two main functions that are part of every Sketch
• setup(): Called once when the Sketch starts
• loop(): Called over and over and is the main part of the Sketch
• Both functions must be present even if not needed
6. Microcontrollers
• Digital pins can be configured as inputs or outputs
• Pins default to input so no need to declare explicitly
• Pins configured as output can provide substantial current to other circuits
• Provides enough current to power an LED or other sensors
• Does not provide enough current to power motors or solenoids
7. Development
• Windows:Arduino IDE, Visual Studio plugin
• Linux, Mac OS X:Arduino IDE
• Bare Minimum of code for a sketch:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
8. Standard Libraries
• EEPROM - reading and writing to "permanent" storage
• Ethernet - for connecting to the internet using theArduino Ethernet Shield
• Firmata - for communicating with applications on the computer using a standard serial protocol.
• GSM - for connecting to a GSM/GRPS network with the GSM shield.
• LiquidCrystal - for controlling liquid crystal displays (LCDs)
• SD - for reading and writing SD cards
• Servo - for controlling servo motors
• SPI - for communicating with devices using the Serial Peripheral Interface (SPI) Bus
• SoftwareSerial - for serial communication on any digital pins.
• Stepper - for controlling stepper motors
• WiFi - for connecting to the internet using theArduinoWiFi shield
• Wire -TwoWire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors.
9. ConnectYour Arduino
• Get an Arduino board and cable
• Download the Arduino IDE
• Connect the board via USB
• Install the drivers
• Launch the Arduino IDE
10. UploadYour Sketch
• Create new or open existing sketch
• Select your board
• Select your serial port
• Upload your sketch
Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free.
Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms.Cross-platform - The Arduino software runs on Windows, Macintosh OSX, and Linux operating systems. Simple, clear programming environment - The Arduino programming environment is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well.Open source and extensible software- The Arduino software is published as open source tools, available for extension by experienced programmers. Open source and extensible hardware - The Arduino is based on Atmel's ATMEGA8 and ATMEGA168 microcontrollers. The plans for the modules are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it.
Wiring is an open source electronics prototyping platform composed of a programming language, an integrated development environment (IDE), and a single-board microcontroller. It was developed starting in 2003 by Hernando Barragán.Processing is an open source programming language and environment for people who want to create images, animations, and interactions.
Input pins make extremely small demands on the circuit that they are sampling, say equivalent to a series resistor of 100 mega ohm in front of the pin. This means that it takes very little current to move the input pin from one state to another, and can make the pins useful for such tasks as implementing a capacitive touch sensor, reading an LED as a photodiode, or reading an analog sensor with a scheme such as RCTime.This also means however, that input pins with nothing connected to them, or with wires connected to them that are not connected to other circuits, will report seemingly random changes in pin state, picking up electrical noise from the environment, or capacitively coupling the state of a nearby pin.
You need to use a standard USB cable (A plug to B plug), the kind you would connect to a USB printer.The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from either the USB connection to the computer or an external power supply. Connect the Arduino board to your computer using the USB cable. The green power LED (labelled PWR) should go on.