Upload
charles-boadu-akoto-jnr
View
483
Download
0
Embed Size (px)
Citation preview
Introducing the ArduinoBoadu A. Charles Jnr
Definition
…an open-source electronics platform based on easy-to-use
hardware and software.
• Eaaaaasy to use
• Inexpensive
• Cross-platform
• Simple, clear programming environment
• Open source and extensible software
• Open source and extensible hardware
Why Arduino?
Flavours
Arduino 101
Arduino ZERO
Arduino MEGA
2.7”2.1”
Costs $25 Weighs 25g
Description
How to Use the Arduino• Write code in Arduino IDE.
• Connect Arduino to PC using USB cable.
• Click button on IDE to compile program.
• Click button on IDE to load program
unto microcontroller.
• Voila!
…any device that accepts input, performs some computations or
processing of the input and produces an output.
Technically, that makes an Arduino a computer.
Compared to a Computer
SemanticsInput Sensors
Output Actuators
Passive IR Sensor
Servo
Input
Input Pins
20 Input Pins14 Digital Input Pins
0-136 Analog Input Pins
A0-A5
Input Pins - Example
Processing
Processing
ATmega328P
Processing
Atmega328P Specs
Program Memory Size 32KB (16K x 16)Program Memory Type FLASH
FLASH Memory 32 KEEPROM Size 1KB
RAM Size 2KBVoltage - Supply (Vcc/Vdd) 1.8 V ~ 5.5 V
Output
Output Pins
14 Output Pins8 0/1 Pins
0,1,2,4,7,8,12,136 PWM Pins
3,5,6,9,10,11
Output Pins - Example
The Arduino and Power
Power Ports
Male Power Jack
A-B USB Socket
Power Supply9V Adapter Standard A-B USB Cable
Battery Pack with Female Jack
Drawing Power
5V
3.3V
GND
Programming The Arduino
Software IDE
Programming Language
Code Structure1 void setup() { 2 3 } 4 5 void loop() { 6 7 }
Sample Program 11 void setup() { 2 pinMode(13, OUTPUT); 3 } 4 5 void loop() { 6 digitalWrite(13, HIGH); 7 delay(1000); 8 9 digitalWrite(13, LOW); 10 delay(1000); 11 }
Sample Program 21 void setup() { 2 pinMode(11, OUTPUT); 3 } 4 5 void loop() { 6 for (int i=0; i<255; i++) { 7 analogWrite(11, i); 8 delay(500); 9 } 10 }
Programming Workflow2. Verify/compile code
3. Upload code unto microcontroller Converts wiring language to bytes of instructions in one Intel hex file. Loads hex file unto microcontroller
1. Write code
Keep your eye on the logs
For All You JS LoversJohnny Five
For All You JS Lovers
Sample Program 1
1 var five = require("johnny-‐five"); 2 var board = new five.Board(); 3 4 board.on("ready", function() { 5 var led = new five.Led(13); 6 led.blink(500); 7 });
1 var five = require("johnny-‐five"); 2 var board = new five.Board(); 3 4 board.on("ready", function() { 5 var led = new five.Led(11); 6 led.fadeIn(2000); 7 });
Sample Program 2
For All You JS Lovers
Extensions/Expansions
ShieldsGSM Shield
Ethernet Shield
Wifi ShieldNFC Shield
SD Card Shield
Shields7 Segment Display Shield
http://site.gravitech.us/Arduino/SHIELD7/7-SEG_SHIELD-03rs.jpg
Libraries
Arduino Product Family
Mass Production
Mass Production
Mass Production
https://www.arduino.cc/en/Main/Standalone
ATmega-328P
Thank You
Appendices
Arduino Product Family
https://www.arduino.cc/en/Main/Products
Microcontroller ATMega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
Length 68.6 mm
Width 53.4 mm
Weight 25 g
UNO Technical Specifications
Applicationhttps://blog.arduino.cc/2015/08/07/a-traditional-weather-house https://blog.arduino.cc/2015/08/24/exploring-tangible-user-interfaces https://blog.arduino.cc/2015/08/20/a-tribute-to-5-bit-baudot-code
Useful Linkshttps://www.arduino.cc https://forum.arduino.cc https://www.sparkfun.com https://www.adafruit.com http://johnny-five.io https://www.robotics.org.za
Useful ToolsFritzing - For designing circuits and sharing ideas http://fritzing.org/download
AlternativesEspruino Pico
Small size Javascript based Cool Web IDE installed as a Chrome Extension
AlternativesIntel Edison
Portable. Supports Arduino, JS, Python & C/C++ Languages. Integration support for:
• Microsoft Azure IoT Suite • Amazon Web Services (AWS) • IBM Bluemix
AlternativesLilly Pad
Tiny Sewable