hardware hacking on the pi; what's js got to do with it
DESCRIPTION
Hardware Hacking using the Raspberry Pi and NodeJS with a bit of general knowledge thrown in.TRANSCRIPT
![Page 1: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/1.jpg)
HARDWARE HACKING AND THE RASPBERRY PI; WHAT'S JAVASCRIPT GOT TO DO WITH IT?
![Page 2: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/2.jpg)
ALEX ROCHE@alexHacked
![Page 3: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/3.jpg)
HARDWARE HACKING; WAT?
![Page 4: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/4.jpg)
HARDWARE HACKING; WAT?
• We take electronics and bend them to our will
![Page 5: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/5.jpg)
HARDWARE HACKING; WAT?
• We take electronics and bend them to our will
• Can use any component, as long as it can be soldered
![Page 6: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/6.jpg)
HARDWARE HACKING; WAT?
• We take electronics and bend them to our will
• Can use any component, as long as it can be soldered
• A variety of levels of difficulty and accessibility
![Page 7: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/7.jpg)
HARDWARE HACKING; WHY?
![Page 8: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/8.jpg)
HARDWARE HACKING; WHY?
• Prototyping concepts and systems
![Page 9: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/9.jpg)
HARDWARE HACKING; WHY?
• Prototyping concepts and systems
• Replacing older tech that has failed
![Page 10: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/10.jpg)
HARDWARE HACKING; WHY?
• Prototyping concepts and systems
• Replacing older tech that has failed
• Making something cool
![Page 11: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/11.jpg)
HARDWARE HACKING; HOW?
![Page 12: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/12.jpg)
HARDWARE HACKING; HOW?
• A basic knowledge of electronics is definitely helpful
![Page 13: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/13.jpg)
HARDWARE HACKING; HOW?
• A basic knowledge of electronics is definitely helpful
• Skills such as soldering and stripping wires
![Page 14: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/14.jpg)
HARDWARE HACKING; HOW?
• A basic knowledge of electronics is definitely helpful
• Skills such as soldering and stripping wires
• GPIO pins; GPIO pins everywhere!
![Page 15: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/15.jpg)
HARDWARE HACKING; HOW?
• A basic knowledge of electronics is definitely helpful
• Skills such as soldering and stripping wires
• GPIO pins; GPIO pins everywhere!
• No 'correct' or 'right' way
![Page 16: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/16.jpg)
HARDWARE HACKING; HOW?
• A basic knowledge of electronics is definitely helpful
• Skills such as soldering and stripping wires
• GPIO pins; GPIO pins everywhere!
• No 'correct' or 'right' way
• Be safe and have respect for electricity
![Page 17: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/17.jpg)
HARDWARE HACKING; WHEN?
![Page 18: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/18.jpg)
HARDWARE HACKING; WHEN?
• Creating projects to react solely to electricity
![Page 19: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/19.jpg)
HARDWARE HACKING; WHEN?
• Creating projects to react solely to electricity
• Using timing chips, resistors and circuit boards
![Page 20: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/20.jpg)
HARDWARE HACKING; WHEN?
• Creating projects to react solely to electricity
• Using timing chips, resistors and circuit boards
• Programmable micro controllers
![Page 21: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/21.jpg)
HARDWARE HACKING; WHEN?
• Creating projects to react solely to electricity
• Using timing chips, resistors and circuit boards
• Programmable micro-controllers
• Micro-controllers on an integrated platform
![Page 22: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/22.jpg)
ALL THE OPTIONS!
• A lot of options for a lot of different skill levels
![Page 23: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/23.jpg)
ALL THE OPTIONS!
• A lot of options for a lot of different skill levels
• Little Bits
![Page 24: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/24.jpg)
ALL THE OPTIONS!
• A lot of options for a lot of different skill levels
• Little Bits
• Makey Makey
![Page 25: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/25.jpg)
ALL THE OPTIONS!
• A lot of options for a lot of different skill levels
• Little Bits
• Makey Makey
• Arduino
![Page 26: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/26.jpg)
ALL THE OPTIONS!
• A lot of options for a lot of different skill levels
• Little Bits
• Makey Makey
• Arduino
• Raspberry Pi
![Page 27: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/27.jpg)
LITTLE BITS
![Page 28: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/28.jpg)
LITTLE BITS
![Page 29: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/29.jpg)
LITTLE BITS
• Individual, pre-formed components
![Page 30: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/30.jpg)
LITTLE BITS
• Individual, pre-formed components
• Held together with magnets
![Page 31: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/31.jpg)
LITTLE BITS
• Individual, pre-formed components
• Held together with magnets
• Different colours to help design a circuit
![Page 32: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/32.jpg)
LITTLE BITS; A BIT USEFUL?
![Page 33: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/33.jpg)
LITTLE BITS; A BIT USEFUL?
• Extremely Modular
![Page 34: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/34.jpg)
LITTLE BITS; A BIT USEFUL?
• Extremely Modular
• Incredibly Hands On
![Page 35: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/35.jpg)
LITTLE BITS; A BIT USEFUL?
• Extremely Modular
• Incredibly Hands On
• Makes exploring hardware simple and fun
![Page 36: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/36.jpg)
LITTLE BITS; A BIT USEFUL?
• Extremely Modular
• Incredibly Hands On
• Makes exploring hardware simple and fun
• Best for proof of concepts and toying with new ideas
![Page 37: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/37.jpg)
MAKEYMAKEY
![Page 38: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/38.jpg)
MAKEYMAKEY
• Plug and Play with your computer
![Page 39: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/39.jpg)
MAKEYMAKEY
• Plug and Play with your computer
• Acts as a Keyboard
![Page 40: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/40.jpg)
MAKEYMAKEY
• Plug and Play with your computer
• Acts as a Keyboard
• Plug and clip wires in to the board to complete a circuit
![Page 41: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/41.jpg)
MAKEYMAKEY; MAKES THINGS COOL?
![Page 42: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/42.jpg)
MAKEYMAKEY; MAKES THINGS COOL?
• Binary Input
![Page 43: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/43.jpg)
MAKEYMAKEY; MAKES THINGS COOL?
• Binary Input
• Easy way to hack together basic interaction
![Page 44: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/44.jpg)
MAKEYMAKEY; MAKES THINGS COOL?
• Binary Input
• Easy way to hack together basic interaction
• Key Events can be used to detect interaction
![Page 45: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/45.jpg)
ARDUINO
![Page 46: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/46.jpg)
ARDUINO
• Microcontroller on a circuitboard
![Page 47: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/47.jpg)
ARDUINO
• Microcontroller on a circuitboard
• GPIO pins
![Page 48: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/48.jpg)
ARDUINO
• Microcontroller on a circuitboard
• GPIO pins
• Programmable over USB
![Page 49: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/49.jpg)
ARDUINO
• Microcontroller on a circuitboard
• GPIO pins
• Programmable over USB
• Can run Javascript and NodeJS
![Page 50: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/50.jpg)
ARDUINO; OPEN SOURCE MEANS OPEN OPTIONS
![Page 51: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/51.jpg)
ARDUINO; OPEN SOURCE MEANS OPEN OPTIONS
• Arduino UNO
![Page 52: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/52.jpg)
ARDUINO; OPEN SOURCE MEANS OPEN OPTIONS
• Arduino UNO
• Arduino Mega
![Page 53: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/53.jpg)
ARDUINO; OPEN SOURCE MEANS OPEN OPTIONS
• Arduino UNO
• Arduino Mega
• Arduino Lilypad
![Page 54: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/54.jpg)
ARDUINO; OPEN SOURCE MEANS OPEN OPTIONS
• Arduino UNO
• Arduino Mega
• Arduino Lilypad
• Open Source; can be reproduced by anybody with the right components
![Page 55: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/55.jpg)
ARDUINO; HOW TO CODE
![Page 56: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/56.jpg)
ARDUINO; HOW TO CODE
• IDE based on translating simple code to C++
![Page 57: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/57.jpg)
ARDUINO; HOW TO CODE
• IDE based on translating simple code to C++
• BreakoutJS; Javascript and Web Browser interactivity
![Page 58: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/58.jpg)
ARDUINO; HOW TO CODE
• IDE based on translating simple code to C++
• BreakoutJS; Javascript and Web Browser interactivity
• Johnny Five; Node based framework
![Page 59: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/59.jpg)
RASPBERRY PI; TASTY!
![Page 60: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/60.jpg)
RASPBERRY PI; TASTY!
• A computer (and then some)
![Page 61: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/61.jpg)
RASPBERRY PI; TASTY!
• A computer (and then some)
• GPIO pins
![Page 62: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/62.jpg)
RASPBERRY PI; TASTY!
• A computer (and then some)
• GPIO pins
• Has all the hardware needed for a computer onboard
![Page 63: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/63.jpg)
RASPBERRY PI; TASTY!
• A computer (and then some)
• GPIO pins
• Has all the hardware needed for a computer onboard
• Runs a boatload of operating systems
![Page 64: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/64.jpg)
RASPBERRY PI; TASTY!
• A computer (and then some)
• GPIO pins
• Has all the hardware needed for a computer onboard
• Runs a boatload of operating systems
• GPIO pins are easily addressable
![Page 65: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/65.jpg)
RASPBERRY PI; CHOICES!
![Page 66: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/66.jpg)
RASPBERRY PI; CHOICES!
• Two Different Types
![Page 67: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/67.jpg)
RASPBERRY PI; CHOICES!
• Two Different Types
• Model A
![Page 68: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/68.jpg)
RASPBERRY PI; CHOICES!
• Two Different Types
• Model A
• Model B
![Page 69: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/69.jpg)
RASPBERRY PI; MODEL A
![Page 70: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/70.jpg)
RASPBERRY PI; MODEL A
• Single USB
![Page 71: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/71.jpg)
RASPBERRY PI; MODEL A
• Single USB
• 256MB RAM
![Page 72: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/72.jpg)
RASPBERRY PI; MODEL A
• Single USB
• 256MB RAM
• Audio & RCA video output
![Page 73: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/73.jpg)
RASPBERRY PI; MODEL A
• Single USB
• 256MB RAM
• Audio & RCA video output
• HDMI output
![Page 74: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/74.jpg)
RASPBERRY PI; MODEL A
• Single USB
• 256MB RAM
• Audio & RCA video output
• HDMI output
• 26 GPIO pins
![Page 75: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/75.jpg)
RASPBERRY PI; MODEL A
• Single USB
• 256MB RAM
• Audio & RCA video output
• HDMI output
• 26 GPIO pins
• Runs Minecraft!
![Page 76: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/76.jpg)
RASPBERRY PI; MODEL B
![Page 77: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/77.jpg)
RASPBERRY PI; MODEL B
• 2 USB Connectors
![Page 78: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/78.jpg)
RASPBERRY PI; MODEL B
• 2 USB Connectors
• 512MB RAM
![Page 79: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/79.jpg)
RASPBERRY PI; MODEL B
• 2 USB Connectors
• 512MB RAM
• Ethernet Jack
![Page 80: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/80.jpg)
RASPBERRY PI; MODEL B
• 2 USB Connectors
• 512MB RAM
• Ethernet Jack
• 34 GPIO pins
![Page 81: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/81.jpg)
RASPBERRY PI; MODEL B
• 2 USB Connectors
• 512MB RAM
• Ethernet Jack
• 34 GPIO pins
• Additional 8 are mostly unused; supply power and ground
![Page 82: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/82.jpg)
RASPBERRY PI; GPIO MAPPING
![Page 83: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/83.jpg)
RASPBERRY PI; GPIO MAPPING
![Page 84: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/84.jpg)
RASPBERRY PI; GPIO MAPPING
![Page 85: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/85.jpg)
RASPBERRY PI; WHY?
![Page 86: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/86.jpg)
RASPBERRY PI; WHY?
• More Processing Power
![Page 87: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/87.jpg)
RASPBERRY PI; WHY?
• More Processing Power
• Onboard Storage
![Page 88: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/88.jpg)
RASPBERRY PI; WHY?
• More Processing Power
• Onboard Storage
• Freedom of Language Choice
![Page 89: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/89.jpg)
RASPBERRY PI; WHY?
• More Processing Power
• Onboard Storage
• Freedom of Language Choice
• Easily configured Internet Access
![Page 90: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/90.jpg)
RASPBERRY PI; WHY?
• More Processing Power
• Onboard Storage
• Freedom of Language Choice
• Easily configured Internet Access
• Runs any code you write for it on the board instead of tethered to a computer
![Page 91: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/91.jpg)
RASPBERRY PI; WHY NOT?
• Less battery life than an Arduino
![Page 92: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/92.jpg)
RASPBERRY PI; WHY NOT?
• Less battery life than an Arduino
• Can be cumbersome to set up and program
![Page 93: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/93.jpg)
RASPBERRY PI; WHY NOT?
• Less battery life than an Arduino
• Can be cumbersome to set up and program
• Doesn’t have as much of a support for shields
![Page 94: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/94.jpg)
SHIELDS?
![Page 95: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/95.jpg)
SHIELDS?
• Pre created circuit boards that extend functionality
![Page 96: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/96.jpg)
SHIELDS?
• Pre created circuit boards that extend functionality
• Can use multiple shields at once ...
![Page 97: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/97.jpg)
SHIELDS?
• Pre created circuit boards that extend functionality
• Can use multiple shields at once ...
• ... though like using multiple of anything at once, take care.
![Page 98: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/98.jpg)
NODE; WHAT IS IT?
![Page 99: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/99.jpg)
NODE; WHAT IS IT?
• A familiar flavour of Javascript; people already know it!
![Page 100: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/100.jpg)
NODE; WHAT IS IT?
• A familiar flavour of Javascript; people already know it!
• Non Blocking I/O
![Page 101: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/101.jpg)
NODE; WHAT IS IT?
• A familiar flavour of Javascript; people already know it!
• Non Blocking I/O
• Event Driven using callbacks
![Page 102: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/102.jpg)
NODE; WHAT IS IT?
• A familiar flavour of Javascript; people already know it!
• Non Blocking I/O
• Event Driven using callbacks
• Operating System Agnostic (mostly)
![Page 103: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/103.jpg)
NODE; WHY IS IT COOL?
![Page 104: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/104.jpg)
NODE; WHY IS IT COOL?
• Incorporates Google’s V8 Engine for speed
![Page 105: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/105.jpg)
NODE; WHY IS IT COOL?
• Incorporates Google’s V8 Engine for speed
• Has some really fun functions
![Page 106: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/106.jpg)
NODE; WHY IS IT COOL?
• Incorporates Google’s V8 Engine for speed
• Has some really fun functions
• Crypto, OS, FS
![Page 107: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/107.jpg)
NODE; WHY IS IT COOL?
• Incorporates Google’s V8 Engine for speed
• Has some really fun functions
• Crypto, OS, FS
• Has a massive amount of external libraries to augment it
![Page 108: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/108.jpg)
NODE; WHY IS IT COOL?
• Incorporates Google’s V8 Engine for speed
• Has some really fun functions
• Crypto, OS, FS
• Has a massive amount of external libraries to augment it
• A server side language front end developers can write!
![Page 109: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/109.jpg)
NODE; HOW TO INSTALL? LINUX
![Page 110: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/110.jpg)
NODE; HOW TO INSTALL? LINUX
> wget http://nodejs.org/dist/v.0.8.11/node-v0.8.11.tar.gz > tar -zxf node-v0.8.11.tar.gz > cd node-v0.8.11 > ./configure > make > sudo make install
![Page 111: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/111.jpg)
NODE; HOW TO INSTALL? MAC & WINDOWS
![Page 112: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/112.jpg)
NODE; HOW TO INSTALL? MAC & WINDOWS
• Much more simple and straightforward than Linux
![Page 113: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/113.jpg)
NODE; HOW TO INSTALL? MAC & WINDOWS
• Much more simple and straightforward than Linux
• Go get the installer from nodejs.org/download/
![Page 114: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/114.jpg)
NODE; HOW TO INSTALL? MAC & WINDOWS
• Much more simple and straightforward than Linux
• Go get the installer from nodejs.org/download/
• No, really. Download it from there and install it. Job done.
![Page 115: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/115.jpg)
NODE; HOW TO INSTALL? MAC & WINDOWS
• Much more simple and straightforward than Linux
• Go get the installer from nodejs.org/download/
• No, really. Download it from there and install it. Job done.
![Page 116: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/116.jpg)
NODE; HOW TO USE?
![Page 117: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/117.jpg)
NODE; HOW TO USE?
• Write JavaScript!
![Page 118: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/118.jpg)
NODE; HOW TO USE?
• Write JavaScript!
• Watch out for the PHP-esque require(“”); though!
![Page 119: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/119.jpg)
NODE; HOW TO USE?
• Write JavaScript!
• Watch out for the PHP-esque require(“”); though!
• Make use of the inbuilt libraries in NodeJS
![Page 120: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/120.jpg)
NPM; NOT PROBLEMATIC, MOSTLY
![Page 121: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/121.jpg)
NPM; NOT PROBLEMATIC, MOSTLY
• Nodes inbuilt library management tool
![Page 122: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/122.jpg)
NPM; NOT PROBLEMATIC, MOSTLY
• Nodes inbuilt library management tool
• Has its own website listing all of the modules
![Page 123: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/123.jpg)
NPM; NOT PROBLEMATIC, MOSTLY
• Nodes inbuilt library management tool
• Has its own website listing all of the modules
• Makes it incredibly easy to install modules
![Page 124: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/124.jpg)
NPM; HOW TO USE
![Page 125: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/125.jpg)
NPM; HOW TO USE
• It all starts with npm
![Page 126: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/126.jpg)
NPM; HOW TO USE
• It all starts with npm
• Different Keywords; https://npmjs.org/docs
![Page 127: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/127.jpg)
NPM; HOW TO USE
• It all starts with npm
• Different Keywords; https://npmjs.org/docs
• Most useful are install and update
![Page 128: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/128.jpg)
NPM; HOW TO USE
• It all starts with npm
• Different Keywords; https://npmjs.org/docs
• Most useful are install and update
•npm install || npm update
![Page 129: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/129.jpg)
NPM; INSTALLING A MODULE
![Page 130: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/130.jpg)
NPM; INSTALLING A MODULE
• Find the package you want to install on the npm site
![Page 131: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/131.jpg)
NPM; INSTALLING A MODULE
• Find the package you want to install on the npm site
• Run npm install gpio to install the package
![Page 132: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/132.jpg)
NPM; INSTALLING A MODULE
• Find the package you want to install on the npm site
• Run npm install gpio to install the package
•-g flag installs globally instead of locally for command line use
![Page 133: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/133.jpg)
NPM; INSTALLING A MODULE
• Find the package you want to install on the npm site
• Run npm install gpio to install the package
•-g flag installs globally instead of locally for command line use
•require(“gpio”); in your project
![Page 134: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/134.jpg)
NPM; INSTALLING A MODULE
• Find the package you want to install on the npm site
• Run npm install gpio to install the package
•-g flag installs globally instead of locally for command line use
•require(“gpio”); in your project
• npm packages need to be installed in each project’s folder you intend to use them in
![Page 135: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/135.jpg)
BAKING A RASPBERRY PI
![Page 136: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/136.jpg)
BAKING A PI
• We have a lot of choices for the operating system
![Page 137: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/137.jpg)
BAKING A PI
• We have a lot of choices for the operating system
• Linux
![Page 138: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/138.jpg)
BAKING A PI
• We have a lot of choices for the operating system
• Linux
• RISC
![Page 139: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/139.jpg)
BAKING A PI
• We have a lot of choices for the operating system
• Linux
• RISC
• Android
![Page 140: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/140.jpg)
BAKING A PI
• We have a lot of choices for the operating system
• Linux
• RISC
• Android
• FirefoxOS
![Page 141: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/141.jpg)
COOKING THE FILLING
• ç
![Page 142: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/142.jpg)
COOKING THE FILLING
• Windows
• Win32DiskImager
![Page 143: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/143.jpg)
COOKING THE FILLING
• Windows
• Win32DiskImager
• Mac
• RPI sd card builder, PiWriter, Pi Filler
![Page 144: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/144.jpg)
COOKING THE FILLING
• Windows
• Win32DiskImager
• Mac
• RPI sd card builder, PiWriter, Pi Filler
• Linux
• ImageWriter
![Page 145: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/145.jpg)
COOKING THE FILLING
• Windows
• Win32DiskImager
• Mac
• RPI sd card builder, PiWriter, Pi Filler
• Linux
• ImageWriter
![Page 146: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/146.jpg)
COOKING THE FILLING
• Windows
• Win32DiskImager
• Mac
• RPI sd card builder, PiWriter, Pi Filler
• Linux
• ImageWriter
![Page 147: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/147.jpg)
CUTTING IN TO THE PI
![Page 148: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/148.jpg)
CUTTING IN TO THE PI
• First off, we install Adafruit’s Occidentalis distribution
![Page 149: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/149.jpg)
CUTTING IN TO THE PI
• First off, we install Adafruit’s Occidentalis distribution
• We SSH in to the Raspberry Pi
![Page 150: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/150.jpg)
CUTTING IN TO THE PI
• First off, we install Adafruit’s Occidentalis distribution
• We SSH in to the Raspberry Pi
• We connect it to a monitor with keyboard and mouse
![Page 151: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/151.jpg)
CUTTING IN TO THE PI; SSH
![Page 152: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/152.jpg)
CUTTING IN TO THE PI; SSH
• Power it up!
![Page 153: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/153.jpg)
CUTTING IN TO THE PI; SSH
• Power it up!
• Plug an Ethernet cable in to your Pi and your Router
![Page 154: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/154.jpg)
CUTTING IN TO THE PI; SSH
• Power it up!
• Plug an Ethernet cable in to your Pi and your Router
• Run ssh raspberrypi.local on your computer to get to the Pi
![Page 155: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/155.jpg)
CUTTING IN TO THE PI; SSH
• Power it up!
• Plug an Ethernet cable in to your Pi and your Router
• Run ssh raspberrypi.local on your computer to get to the Pi
• Alternatively log in to your router and get the IP of the Pi from there; ssh pi@<ip_of_pi> . Use the password “raspberry”
![Page 156: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/156.jpg)
WIRED IS BORING, RIGHT?!
![Page 157: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/157.jpg)
LETS GO WIRELESS!
![Page 158: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/158.jpg)
CUTTING THE PI LOOSE
![Page 159: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/159.jpg)
CUTTING THE PI LOOSE
• Run sudo nano /etc/network/interfaces
![Page 160: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/160.jpg)
CUTTING THE PI LOOSE
• Run sudo nano /etc/network/interfaces
• Delete the contents of the file
![Page 161: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/161.jpg)
CUTTING THE PI LOOSE
• Run sudo nano /etc/network/interfaces
• Delete the contents of the file
• <- Replace it with this
> auto lo > iface lo inet loopback > iface eth0 inet dhcp > allow-hotplug wlan0 > auto wlan0 > iface wlan0 inet dhcp > wpa-ssid "ssid" > wpa-psk "password"
![Page 162: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/162.jpg)
CUTTING THE PI LOOSE
• Run sudo nano /etc/network/interfaces
• Delete the contents of the file
• <- Replace it with this
• Replace SSID and PASSWORD
> auto lo > iface lo inet loopback > iface eth0 inet dhcp > allow-hotplug wlan0 > auto wlan0 > iface wlan0 inet dhcp > wpa-ssid "ssid" > wpa-psk "password"
![Page 163: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/163.jpg)
BLOWING RASPBERRIES
![Page 164: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/164.jpg)
BLOWING RASPBERRIES
GPIO
API; https://npmjs.org/package/gpio
Manual Setting and Getting
![Page 165: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/165.jpg)
BLOWING RASPBERRIES
Johnny-Five
API; https://github.com/rwaldron/johnny-five/wiki
Function Based System for Arduino
GPIO
API; https://npmjs.org/package/gpio
Manual Setting and Getting for Raspberry Pi
![Page 166: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/166.jpg)
BLOWING RASPBERRIES; SETTING UP A CONTEXT
![Page 167: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/167.jpg)
BLOWING RASPBERRIES; SETTING UP A CONTEXT
GPIO > var gpio = require("gpio"); > >/* Calling export with a pin >number will export that header >and return a gpio header >instance*/ > > var gpio4 = gpio.export(4, { > direction: 'out', > interval: 200, > ready: function() { > } >});
![Page 168: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/168.jpg)
BLOWING RASPBERRIES; SETTING UP A CONTEXT
Johnny-Five > var five = require("johnny- five"), board, led; > > board = new five.Board(); > >board.on("ready", function() { });
GPIO > var gpio = require("gpio"); > >/* Calling export with a pin >number will export that header >and return a gpio header >instance*/ > > var gpio4 = gpio.export(4, { > direction: 'out', > interval: 200, > ready: function() { > } >});
![Page 169: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/169.jpg)
BLOWING RASPBERRIES; MAKING A LIGHT BLINK
![Page 170: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/170.jpg)
BLOWING RASPBERRIES; MAKING A LIGHT BLINK
GPIO >Var strobeTimer = setInterval(function() { > gpio4.set(); > setTimeout( > function(){ > gpio4.reset(); > }, 200); > }, 400); >/*Can also pass a number in to >the >set function.*/
![Page 171: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/171.jpg)
BLOWING RASPBERRIES; MAKING A LIGHT BLINK
Johnny-Five > /* Create a standard `led` >hardware instance*/ > Var led = new five.Led(13); > > /* "strobe" the led in 100ms >on-off phases*/ > led.strobe( 100 );
GPIO >Var strobeTimer = setInterval(function() { > gpio4.set(); > setTimeout( > function(){ > gpio4.reset(); > }, 200); > }, 400); >/*Can also pass a number in to >the >set function.*/
![Page 172: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/172.jpg)
BLOWING RASPBERRIES; GETTING VALUES
![Page 173: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/173.jpg)
BLOWING RASPBERRIES; GETTING VALUES
GPIO >var gpio = require("gpio"); >var gpio4 = gpio.export(4, { > direction: "in", > ready: function() { > Console.log(gpio4.value > } >});
![Page 174: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/174.jpg)
BLOWING RASPBERRIES; GETTING VALUES
Johnny-Five >new five.Pin(13).query( >function(state) { > console.log(state); >});
GPIO >var gpio = require("gpio"); >var gpio4 = gpio.export(4, { > direction: "in", > ready: function() { > Console.log(gpio4.value > } >});
![Page 175: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/175.jpg)
BLOWING RASPBERRIES; SETTING VALUES
![Page 176: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/176.jpg)
BLOWING RASPBERRIES; SETTING VALUES
GPIO > gpio4.set(function() >{ console.log(gpio4.value); >});
![Page 177: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/177.jpg)
BLOWING RASPBERRIES; SETTING VALUES
Johnny-Five Nothing explicit; is accomplished by passing values straight in to the functions
GPIO > gpio4.set(function() >{ console.log(gpio4.value); >});
![Page 178: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/178.jpg)
FINAL HINTS AND TIPS
• Once connected so you can SSH in to it, use a file transfer client
![Page 179: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/179.jpg)
FINAL HINTS AND TIPS
• Once connected so you can SSH in to it, use a file transfer client
• Helpful if the GPIO pins are labeled using the paper overlay for the PI
![Page 180: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/180.jpg)
FINAL HINTS AND TIPS
• Once connected so you can SSH in to it, use a file transfer client
• Helpful if the GPIO pins are labeled using the paper overlay for the PI
• Get a ribbon cord for the Pi; will make your life easier.
![Page 181: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/181.jpg)
HE’S STILL NOT FINISHED?
• Not everything has to be written in NodeJS
![Page 182: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/182.jpg)
HE’S STILL NOT FINISHED?
• Not everything has to be written in NodeJS
• Is, however, an accessible starting point for front end developers
![Page 183: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/183.jpg)
HE’S STILL NOT FINISHED?
• Not everything has to be written in NodeJS
• Is, however, an accessible starting point for front end developers
• Projects don’t need to be in the same language
![Page 184: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/184.jpg)
HE’S STILL NOT FINISHED?
• Not everything has to be written in NodeJS
• Is, however, an accessible starting point for front end developers
• Projects don’t need to be in the same language
• Important that what you’ve written works
![Page 185: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/185.jpg)
MAYBE HE NEARLY IS?
• Don’t be afraid; there’s always help at hand!
![Page 186: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/186.jpg)
MAYBE HE NEARLY IS?
• Don’t be afraid; there’s always help at hand!
• Don’t expect to not learn anything during the project!
![Page 187: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/187.jpg)
MAYBE HE NEARLY IS?
• Don’t be afraid; there’s always help at hand!
• Don’t expect to not learn anything during the project!
• Have fun with your project!
![Page 188: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/188.jpg)
MAYBE HE NEARLY IS?
• Don’t be afraid; there’s always help at hand!
• Don’t expect to not learn anything during the project!
• Have fun with your project!
• Be Careful!
![Page 189: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/189.jpg)
THANK YOU!
![Page 190: Hardware hacking on the pi; what's js got to do with it](https://reader031.vdocument.in/reader031/viewer/2022013011/54c863a44a7959045b8b474d/html5/thumbnails/190.jpg)
RESOURCES
• Node; nodejs.org/downloads/
• NPM; npmjs.org
• NodeSchool; nodeschool.io
• Adafruit Industries; http://learn.adafruit.com/category/learn-raspberry-pi
• RS-Components; uk.rs-online.com
• Farnell; uk.farnell.com