Introduction to Arduino for Developers
Jon Flanders
@jonflanders
At the end of this module you will know:
What Arduino is
How to setup an Arduino environment on :
OSX, Linux, and Windows
Basic Arduino programming skills
How to make an LED blink :)
Why?
Prototyping software is easy and cheap
Prototyping hardware is hard and expensive
Arduino
Is a single-board micro-controller Here’s the official “what is” from
http://arduino.cc
Open-source hardware diagrams
all of the associated software is also open source
Great for prototyping hardware designs
Many commercial products use it for prototyping
Fitbit, Parrot (drones), Pebble (smart watch)
Use for hobby projects
Often with sensors - monitoring temp or moisture levels
With motors - keypad door entries
Hardware
There are many different Arduino products
all have some commonality
Difference usually in form factor
8-bit Atmel AVR chip
Except the Arduino Due uses a 32-bit chip
Communicates with PC using serial port
Newer models expose virtual serial ports over USB
Flash memory for holding a program
boot-loader to upload program to flash
Some number of Digital I/O and Analog I/O pins
Can send power (5v) and/or receive input
“Shields” are add-on boards that provide extra functionality
Ethernet, bluetooth, servo, GSM
Software
Arduino boards can run one program at a time
programs are called “sketches”
Stored in flash memory
Programming language is a simplified version of C/C++
build process adds “main”
Free IDE
Syntax-sensitive editor
Ease of loading
Getting started checklist
Buy one of the Arduino controllers
Download the Arduino IDE (http://arduino.cc/en/Main/Software)
Windows, OSX , and Linux versions available
For Windows - install the appropriate driver
For Linux - must install pre-reqs - http://playground.arduino.cc/learning/linux
Connect your board
USB
Serial port for older boards
Write a sketch
Upload
Enjoy
Hello Arduino
The canonical “Hello World” demo for Arduino is to make an LED blink
Combines a simple sketch with a simple hardware setup
Summary
Arduino is a powerful micro-controller for prototyping and playing
You pick your operating system and your board form factor