Introduction to Arduino
XXXXX
23 May 2016
Shameless Plugs
• Who am I?
• Why am I here?
• Who are you, and why are you here? ;-)
What I’m covering
• Jump start
• What is it
• How to start using it
• Even cooler stuff
Yes … there will be demos
What is Arduino?
Many Types
It’s Open Source
• Both hardware design and software
• Based on an earlier project(?)
• Don’t call it Arduino though!
• Funduino
• Diavalino
• Freeduino
• Seeeduino
• Nanocode
• Arduino name belongs to Arduino.cc
Basics
• The world is analogue (analog)
• Computers are mostly digital
• Arduino bridges divide
• Make complex decisions with simple code
A real world problem!
What about computers?
• Yes you can, but
• Problems
• Physical size
• Complexity
• Drivers
• $$$
• What about smart phones?
• Yes mostly the same issues
Microcontrollers
• Cheap
• Ubiquitous
• But have limited resources
• Need (some) careful design
• Automate almost anything
• Imagination v. credit card
Isn’t it complex?
• Only if you want • Can start very simply
Ok I’m in…
How do I start?
Buy a few things
A board Resistors
Wires
Breadboard LEDs
Or a starter kit
http://www.geeker.co.nz/kits/arduino/ard
uino-starter-kit-standard.html
Arduino Starter Kit (24 Project)
Or just use a free simulator
https://123d.circuits.io
Arduino is a platform
• Many different microcontrollers
• Some more powerful than others
• Different strengths/weaknesses
• hardware < == > software libraries
• No lock in
• The Arduino IDE
A common experience
What about the Raspberry Pi
• Not Arduino
• It’s a microprocessor/System on a Chip
• Much more versatile but more complex
• Can do many things – it’s a computer!
• Costs more!
So why use Arduino?
• Easily talks to real world to get information into a digital world
• Educational – heaps of resources/examples
• Simple to get going
• No operating system in your way
• Just your hardware and your code
Coding
• C like language*
• Windows/Linux/Mac
• Heaps of examples
• Forgiving
Coding
• Easy start
• Download
• Install
• Connect
• Go!
• Need two functions only
• setup()
• loop()
Connect 1/2
• Set the board
Connect 2/2
• Set the port
Time to do some demos!
1. Actuate
2. Sense
3. Control
4. Internet of Things
Demo 1 - Lets do the Arduino “Hello World”
Sensing the real world
• Interface real world to our electronic world
• Analogue or Digital
• Examples
• Light, Motion, Temperature, Sound etc.
• Anything that can be measured can be sensed!
• Used to make decisions
Demo 2 – Digital Sensor
Demo 3 – Analogue Control
Resources
• www.Arduino.cc
• Youtube
• Massimo Banzi: How Arduino is open-sourcing imagination
• https://programmingelectronics.com/thearduinocourse/
• https://www.youtube.com/user/iforce2d
• Purchase
• Ali Express
• Ebay
• Trademe
• Bang Good
• Hobby King
More cool stuff?
Extras
• 1-Day Project: Build Your Own Arduino Uno for $5
• Shields
• Add functionality
• Communications e.g. GSM, Wifi, Ethernet, Radio, etc.
• Camera control
• SD cards
• Your own custom boards (anything)
Internet of Things
• Got me excited
• Needs communication
• Lots of other chips e.g. the ESP
8266
• Built in Wifi
Demo 4 – IoT
Coding #2
• Arduino is usually programmed in a C/C++ type of language
• Not the only option (but smaller communities)
• Graphical languages - Ardublock
• .NET Micro Framework/C#
• Different projects are porting different languages
• Two prominent ones for the ESP 8266
• NodeMCU (LUA)
• Micro Python (err Python I think)
Don’t need to use the Arduino IDE!
• Microsoft Visual Studio
• With intellisense!!!!
http://www.visualmicro.com/
Thank you for patience!
Any questions!