introduction to arduino - hack in the box security …...introduction to arduino by barry van kampen...

50
Introduction to Arduino by Barry van Kampen [email protected]

Upload: others

Post on 12-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 2: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Who?

• Fish_ aka Barry?

• Proud to be a Nerd at ITQ

• Founder of Randomdata

• HiTB 2010 Amsterdam

• 0xThinker!

• The sky is NOT the limit

Page 3: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Agenda

• What you can and what we do

• Introduction to Arduino hardware

• Arduino 1-2-3

• HandsOn!

Page 4: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Experience?

Page 5: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •
Page 6: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •
Page 7: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Blinky!

Page 8: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Blinky!

Page 9: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Blinky!

Page 10: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Blinky!

• Website: http://www.randomdata.nl/blinky/

• Twitter: http://www.twitter.com/randomblinky

• Details & code: http://www.randomdata.nl/wiki/index.php/Adruino_14_segment_LED_board

Page 11: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Garduino

Page 12: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •
Page 13: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Garduino

Page 14: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Garduino

• Stats:

• Details & code: http://www.randomdata.nl/wiki/index.php/Garduino

Page 15: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Other projects

• Blinky 2.0

• Garduino extentions

• Beer/barduino (Brucon)

• Space automation

Page 16: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The serial single sided

Page 17: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The serial

Page 18: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The pro mini

Page 19: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The pro

Page 20: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The Lilypad

Page 21: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

Arduino BT

Page 22: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The Diecimila

Page 23: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The Duemilanove

Page 24: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The boarduino

Page 25: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino

The mega

Page 26: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Arduino’s

Page 27: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

• A shield extends your Arduino functionality

• Shields come in much variety

• Shields are usual compatible with the “classic” arduino’s

Page 28: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

Protoshield

Page 29: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

Ethernetshield

Page 30: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

Motorshield

Page 31: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

RFiDuino

Page 32: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

GPS shield

Page 33: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

Optoshield

Page 34: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

Waveshield

Page 35: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Shields

USB shield:http://www.circuitsathome.com/category/mcu/arduino/usb-shield

Page 36: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

The GUI

• Multi platform

• OSX

• Windows

• Linux

• Easy to use

• Examples to start

Page 37: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

The GUI

Page 38: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

The Code

• C-like language

• Examples :-)

• setup “routine”

• loop “routine”

Page 39: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Practice

• Install the gui

• Hookup

• First code: hello world

• Play around with Arduino

Page 40: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Install the GUI

1. Download the arduino software: http://arduino.cc/en/Main/Software

2. Install the USB drivers

Page 41: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Hello World Arduino

1. Connect the Arduino

2. Start the Arduino software

3. You’re ready to code

Page 42: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Practice 1

Page 43: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Practice 1

• Insert a LED in pin 13* and the ground next to it.

• Open the Arduino programm

• Connect the Arduino to your laptop with USB

* pin 13 has an on board resistor, the rest doesn’t!

Page 44: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Practice 1• Open an example:

Page 45: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Practice 1• Select your serial port

Page 46: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Practice 1• Upload the code

Page 47: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

Watch the LED

Page 48: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

0xTH1NK3R

Page 49: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

0xTH1NK3R

• shields: ethernetshield, datashield, rfidshield

• LEDwar? Knight-rider, randomblink,

Page 50: Introduction to Arduino - Hack In The Box Security …...Introduction to Arduino by Barry van Kampen fish@randomdata.nl Who? • Fish_ aka Barry? • Proud to be a Nerd at ITQ •

?