Introduction to Arduino

!! Picture “Hardware Hacking”

by nicholasjon- flickr

Talk topics (in no particular order)
!! Introduction
"! What is hardware hacking "! How to get started

!! Microprocessors !! Sensors & Switches (Hardware I/O)
"! The world is your mollusc

!! Basic Circuit Theory
"! How to get those sensors to work

.What is hardware hacking !! Hacking "! An elegant solution to a difficult problem "! Using a technology for something it was not originally intended.

Types of hardware hacking !! Just hacking hardware !! Circuit Bending !! Reverse Engineering !! Toy Hacking !! SteamPunk !! Craft Hacking/“Making” .

Getting Started !! Arduino "! "! "! "! "! "! Entry level microprocessor OpenSource Hardware & Software 14 digital Inputs/Outputs (6 PWM Out*) 6 analogue Inputs IDE with loads of example code Aimed at artists/hobbyists with limited programming experience *We’ll come to this shortly .

Embedded C !! 32k Flash. 1k EEPROM !! 16Mhz . 2k SRAM.Arduino (Atmega 328) !! 16bit Microprocessor.

Arduinos are not the only fruit !! Atmel Tiny (ATtiny) !! PIC AVR (PICAXE) !! Range of ARM processors !! FPGA .

touchscreen… . Duemilanove. Mini. Mega. wifi. Autopilots. relays. ethernet. LCD. CNC (*32 makers) "! Sheilds to extend functionality. Motor/ servos. Bluetooth. Robotics. Autonomous Vehicles. Lilypad "! Lots of boards for specific tasks.Arduino !! OpenSource Hardware "! Schematics freely available "! Lots of “Flavours”. radio. Nano. GPS. Diecimila.

Arduino Initiatives !! Software "! Processing !! IDE is based on Processing and Wiring "! Fritzing !! Prototyping and circuit layout !! EduWear "! Introducing programming and electronics to children .

tinker.instructables.it "! http://www.Getting Inspiration !! MakeZine "! http://blog.makezine.com/ !! Circuit-Projects "! http://www.com/ !! Instructables "! http://www.circuit-projects.com/ !! Tinker.it/ .

PWM !! Analog I/O !! Communicating with the board .Board Roadmap !! Powering the Board !! Digital I/O incl.

cc/en/Reference/HomePage .Anatomy of a Sketch !! How we tell the Arduino what to do! !! Getting a sketch to the board !! C program! "! Two functions setup/run "! Api : http://arduino.

loop pinMode digitalWrite delay .First Sketch! !! Open _1_Blink !! Key Points "! "! "! "! setup.

Lets Hack It !! Change the Frequency? !! Faster than the Eye can see? (>24 Hz) !! Change the Duty Cycle? .

Breadboard it up! !! Move the circuit to the Breadboard .

Lets Hack It .

We Created PWM !! Pulse Width Modulation "! Built Into the Arduino "! Open _2_PWM to see it in action !! Key points !! analogWrite .

Lets Hack It !! Change the speed of the dimming cycle? !! Only dim half way? .

Whats PWM For? !! Servos !! Motors !! Displays !! Power Supplies !! Audio !! Heater Control !! Analog Aproximation .

Where is the Input? !! Add a simple button input! !! Pull up/down (some elec theory) .

Breadboard View .

Reading the Input !! Open _3_Button !! Key Points "! If Statement "! digitalRead .

Lets Hack It !! Change it to toggle? !! Do we see any problems? .

Better Buttons !! Open _4_Debounce !! Key Points "! Global "! Millis() .

10.Extend it! !! Setup 3 Leds (pins 11.9) "! Current limiting resistors? !! Setup button on pin 2 !! Open _5_Reflex "! No Debounce? "! Complicated Control Logic? "! While Loop .

Build .

Build .

Lets Hack It !! Find your fastest time? !! Make lights go in reverse order? !! Can you make them sweep instead of loop? !! What other cool changes can you make? .

The Real Game .

The Real Game .

An Analog Sensor !! Open _6_Temp !! Elec Stuff "! Thermistor "! Voltage Drop !! Key Points "! analogRead "! No setup! .

Build .

Build .

if you need a hint look at _7_Solution after giving it a good try.Free Hack !! Can you combine the temp and reflex game code to make a readout for the temp? !! Break the range of values up and assign a range to each led. !! Talk to each other. ask questions. .