Hardware Hacking

2,971 views
2,812 views

Published on

Talk due to be given on 1st Dec at skillsmatter in London on Hardware Hacking.

An introduction on hardware hacking, what it is, how to get started. A live tutorial on the Arduino programming and examples.

2 Comments
3 Likes
Statistics
Notes
  • very nice presentation and good to predict
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • very nice presentation, hope u present more!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
2,971
On SlideShare
0
From Embeds
0
Number of Embeds
43
Actions
Shares
0
Downloads
163
Comments
2
Likes
3
Embeds 0
No embeds

No notes for slide

Hardware Hacking

  1. 1. Hardware Hacking by Andy “Bob The Builder” Brockhurst For the Yahoo! Developers Network and SkillsMatter
  2. 2.  Picture “Hardware Hacking” by nicholasjon- flickr
  3. 3. 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
  4. 4. If anything should go wrong Blame this next guy
  5. 5.  Photo “Hacking”
  6. 6. What is hardware hacking  Hacking  An elegant solution to a difficult problem  Using a technology for something it was not originally intended.
  7. 7. Types of hardware hacking  Just hacking hardware  Circuit Bending  Reverse Engineering  Toy Hacking  SteamPunk  Craft Hacking/“Making”
  8. 8.  Photo: “WRT54G & NSLU2” by lime*monkey- flickr
  9. 9.  Picture “Circuit Bending” by jamie_hladky- flickr
  10. 10. Circuit Bending  Pete Edwards  Musician/Hacker  http://casperelectronics.com
  11. 11.  Picture “Reverse Engineering” by Micah Dowty- flickr
  12. 12.  Picture “Toy Hacking” by Vanderlin - flickr
  13. 13.  Picture “Making”
  14. 14.  Photo: “Steampunk” by Balakov- flickr
  15. 15.  Picture “Reverse Engineering” by Neal Connor- flickr
  16. 16. 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
  17. 17. Arduino (Atmega 328)  16bit Microprocessor, Embedded C  32k Flash, 2k SRAM, 1k EEPROM  16Mhz
  18. 18. Arduinos are not the only fruit  Atmel Tiny (ATtiny)  PIC AVR (PICAXE)  Range of ARM processors  FPGA
  19. 19. Arduino  OpenSource Hardware  Schematics freely available  Lots of “Flavours”; Diecimila, Duemilanove, Mega, Mini, Nano, Lilypad  Lots of boards for specific tasks; Motor/servos, Autonomous Vehicles, Robotics, Autopilots, CNC (*32 makers)  Sheilds to extend functionality; Bluetooth, wifi, radio, ethernet, GPS, relays, LCD, touchscreen…
  20. 20. Arduino Initiatives  Software  Processing  IDE is based on Processing and Wiring  Fritzing  Prototyping and circuit layout  EduWear  Introducing programming and electronics to children
  21. 21. Hardware Hacking Let’s build some stuff!
  22. 22. by Bekathwia - flickr
  23. 23. Arduino (very) Basic I/O - Parts  Setup a circuit  Arduino  Breadboard  LED  Resistor  Switch  Wire
  24. 24. Arduino (very) Basic I/O - Layout
  25. 25. Arduino (very) Basic I/O - Code  Define an input and an output  Read the input and set the output void setup() { pinMode(2, INPUT); pinMode(13, OUTPUT); } void loop() { int switchValue = digitalRead(2); digitalWrite(13, switchValue); }
  26. 26. Take it a bit further  Substitute the LED for a physical interaction device  Servo  Bit more wire
  27. 27. Adding a servo
  28. 28. Update the code #include <Servo.h> Servo myServo; int steps[] = {0,60,120,180}; int currentPos = 0; void setup() { pinMode(2, INPUT); myServo.attach(13); myServo.write(steps[0]); } void loop() { if (HIGH == digitalRead(2)) { currentPos = (3 == currentPos) ? 0 : currentPos + 1; myServo.write(steps[currentPos]); delay(500); } }
  29. 29. Taking it further  Substitute the switch for a physical interaction device  Piezo Electric transducer  Can be used to sense “Knocks”
  30. 30. Wire in the piezo
  31. 31. More code updates #include <Servo.h> Servo myServo; int steps[] = {0,60,120,180}; int currentPos = 0; const int KNOCKTHRESHOLD = 100; void setup() { myServo.attach(13); myServo.write(steps[0]); } void loop() { if (KNOCKTHRESHOLD <= analogRead(0)) { currentPos = (3 == currentPos) ? 0 : currentPos + 1; myServo.write(steps[currentPos]); delay(500); } }
  32. 32. Tour of the software  Arduino IDE  Fritzing
  33. 33. by pieter [iamdoom / bwrah bwrah]- flickr  Photo “Inspiration”
  34. 34. Getting Inspiration  MakeZine  http://blog.makezine.com/  Instructables  http://www.instructables.com/  Circuit-Projects  http://www.circuit-projects.com/  Tinker.it  http://www.tinker.it/
  35. 35. Where to get stuff  Specialist Arduino Retailers (UK)  http://www.earthshinedesign.co.uk/  http://www.oomlout.co.uk/  Other Hardware suppliers (UK)  http://www.active-robots.co.uk/  http://www.techbotics.co.uk/  http://www.technobots.co.uk/  http://www.ebay.co.uk/
  36. 36. Finding fellow hackers  London Hacker Space  http://london.hackspace.org.uk/  irc://irc.freenode.net/london-hack-space  London DorkBot  http://dorkbotlondon.org/
  37. 37. Thank you for listening Where I can be found: http://kingkludge.net/ http://twitter.com/b3cft (or in the pub)

×