49
Introducing the Arduino Boadu A. Charles Jnr

Introducing the Arduino

Embed Size (px)

Citation preview

Page 1: Introducing the Arduino

Introducing the ArduinoBoadu A. Charles Jnr

Page 2: Introducing the Arduino

Definition

…an open-source electronics platform based on easy-to-use

hardware and software.

Page 3: Introducing the Arduino

• Eaaaaasy to use

• Inexpensive

• Cross-platform

• Simple, clear programming environment

• Open source and extensible software

• Open source and extensible hardware

Why Arduino?

Page 4: Introducing the Arduino

Flavours

Arduino 101

Arduino ZERO

Arduino MEGA

Page 5: Introducing the Arduino

2.7”2.1”

Costs $25 Weighs 25g

Description

Page 6: Introducing the Arduino

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!

Page 7: Introducing the Arduino

…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

Page 8: Introducing the Arduino

SemanticsInput Sensors

Output Actuators

Passive IR Sensor

Servo

Page 9: Introducing the Arduino

Input

Page 10: Introducing the Arduino

Input Pins

20 Input Pins14 Digital Input Pins

0-136 Analog Input Pins

A0-A5

Page 11: Introducing the Arduino

Input Pins - Example

Page 12: Introducing the Arduino

Processing

Page 13: Introducing the Arduino

Processing

ATmega328P

Page 14: Introducing the Arduino

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

Page 15: Introducing the Arduino

Output

Page 16: Introducing the Arduino

Output Pins

14 Output Pins8 0/1 Pins

0,1,2,4,7,8,12,136 PWM Pins

3,5,6,9,10,11

Page 17: Introducing the Arduino

Output Pins - Example

Page 18: Introducing the Arduino

The Arduino and Power

Page 19: Introducing the Arduino

Power Ports

Male Power Jack

A-B USB Socket

Page 20: Introducing the Arduino

Power Supply9V Adapter Standard A-B USB Cable

Battery Pack with Female Jack

Page 21: Introducing the Arduino

Drawing Power

5V

3.3V

GND

Page 22: Introducing the Arduino

Programming The Arduino

Page 23: Introducing the Arduino

Software IDE

Page 24: Introducing the Arduino

Programming Language

Page 25: Introducing the Arduino

Code Structure1    void  setup()  {  2  3    }  4  5    void  loop()  {  6  7    }

Page 26: Introducing the Arduino

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  }

Page 27: Introducing the Arduino

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  }

Page 28: Introducing the Arduino

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

Page 29: Introducing the Arduino

For All You JS LoversJohnny Five

Page 30: Introducing the Arduino

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

Page 31: Introducing the Arduino

For All You JS Lovers

Page 32: Introducing the Arduino

Extensions/Expansions

Page 33: Introducing the Arduino

ShieldsGSM Shield

Ethernet Shield

Wifi ShieldNFC Shield

SD Card Shield

Page 34: Introducing the Arduino

Shields7 Segment Display Shield

http://site.gravitech.us/Arduino/SHIELD7/7-SEG_SHIELD-03rs.jpg

Page 35: Introducing the Arduino

Libraries

Page 36: Introducing the Arduino

Arduino Product Family

Page 37: Introducing the Arduino

Mass Production

Page 38: Introducing the Arduino

Mass Production

Page 39: Introducing the Arduino

Mass Production

https://www.arduino.cc/en/Main/Standalone

ATmega-328P

Page 40: Introducing the Arduino

Thank You

Page 41: Introducing the Arduino

Appendices

Page 42: Introducing the Arduino

Arduino Product Family

https://www.arduino.cc/en/Main/Products

Page 43: Introducing the Arduino

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

Page 44: Introducing the Arduino

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

Page 45: Introducing the Arduino

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

Page 46: Introducing the Arduino

Useful ToolsFritzing - For designing circuits and sharing ideas http://fritzing.org/download

Page 47: Introducing the Arduino

AlternativesEspruino Pico

Small size Javascript based Cool Web IDE installed as a Chrome Extension

Page 48: Introducing the Arduino

AlternativesIntel Edison

Portable. Supports Arduino, JS, Python & C/C++ Languages. Integration support for:

• Microsoft Azure IoT Suite • Amazon Web Services (AWS) • IBM Bluemix

Page 49: Introducing the Arduino

AlternativesLilly Pad

Tiny Sewable