INTRODUCTION TO OPEN- SOURCE ELECTRONIC WITH...

Preview:

Citation preview

INTRODUCTION TO OPEN-SOURCE ELECTRONIC WITH ARDUINO

Rémi Patiès 19 JUIN 2012

CONTENT

2

1 Introduction

2 Arduino hardware

3 Arduino software

4 Example

5 Conclusion

1. INTRODUCTION

3

4

What is Physical Computing ?

Physical Computing

5

Means building interactive physical systems by the use of

software and hardware that can sense and respond to

the analog world - Wikipedia

“A connection between software and the world”

What is Arduino?

6

An open-source electronic prototyping platform

• An physical board

• A programming environment

• A great community

Project began in Italy in 2005

Co-founders of the project Gianluca Martino, Massimo Banzi, David Cuartielles

Arduino Hardware

7

• Licence: Creative Commons Attribution Share-Alike 2.5

• Price: 30$

Many Hardware designs

Arduino Software

8

• Licence LGPL

• Price: free

• Multi-platform

Arduino Integrated Development Environment

What can you do with it?

9

• Robotics

• Home automation

• Music

• Sensor Network • Interactive objects

• Interactive art

• Interactive spaces

• Interactive…

10

- 11

- 12

- 13

2. ARDUINO HARDWARE

14

Overview

15

• Based on the microcontroller ATmega328

• 14 digital input/output pins

• 6 analog inputs • 16MHz crystal oscillator

• USB connection

• A power jack

• ICSP header

• Power outputs • Reset button

Top Bottom

Power

16

• Powered via USB connection or with an external power

source

• Vin Input pin

• 5v output pin

• 3v3 output pin

• GND

Memory

• Flash Memory : 32KB (0,5KB used by bootloader)

• SRAM: 2KB

• EEPROM: 1KB

Input and Output

17

• 14 digital input/output pins

• Receive (RX) and transmit (TX) serial data

• PWM

• SPI communication

• 6 analog inputs

• Input Voltage Recommended (7-12V)

Input example - sensor

18

• Motion detection

• Light detection

• Button

• Joystick

• Accelerometers

• Gyroscope

• Microphone

• GPS…

• Screen (LCD)

• Light (LED) • Servo

• Motors

• Loudspeaker…

Output example

19

Communication

20

• RF shields • USB

• Wi-Fi

• Ethernet

• Bluetooth…

3. ARDUINO SOFTWARE

21

Overview

22

Langage

23

• C/C++ • Cf. the Web…

http://arduino.cc/en/Reference/HomePage

The "Hello World!" of Physical Computing!

24

/* Blinking LED */

int ledPin = 13; // LED connected to digital pin 13

void setup()

{

pinMode(ledPin, OUTPUT); // sets the digital pin as output

}

void loop()

{

digitalWrite(ledPin, HIGH); // sets the LED on

delay(1000); // waits for a second

digitalWrite(ledPin, LOW); // sets the LED off

delay(1000); // waits for a second

}

4. EXAMPLE

25

Gmail Notifier

26

• Idea: • build a physical mail notifier

• How?

• Python script

• Connect to my Google mail account

• Return number of mails to Arduino Board via

a serial connection

• Arduino

• Get the number of mail • Turn On/Off appropriate LEDs

• Batch files

• Launch python script every x seconds

4. CONCLUSION

27

Advantages and disadvantages

28

• “ It’s Fun ! ” • Price

• Great Community

• Resources

• there are libraries for almost everything

• There are shields for almost everything

• Easy development

• “ But It’s limited… ” • Performances (Signal processing….)

• Memory = 32KB

Persuaded ???

Thanks!

29

Recommended