How To Electrocute Yourself using the Internet

  • 553 views
Uploaded on

A talk about the Internet of things, Arduino and JavaScript frameworks including BreakoutJS and Johnny-Five

A talk about the Internet of things, Arduino and JavaScript frameworks including BreakoutJS and Johnny-Five

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
553
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
9
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. HOW TO ELECTROCUTE YOURSELF USING THE INTERNET
  • 2. ALEX ROCHE @ALEXHACKED
  • 3. Tom Scott being Electrocuted as part of a PayPal charity hack. (http://www.youtube.com/embed/j_74elSiI7E)
  • 4. Matt, of SI Digital, being shocked.
  • 5. WHAT I'M GOING TO BE TALKING ABOUT Internet of Things Arduino Johnny Five BreakoutJS
  • 6. Today computers—and, therefore, the Internet—are almost wholly dependent on human beings for information ... The problem is, people have limited time, attention and accuracy—all of which means they are not very good at capturing data about things in the real world ... We're physical, and so is our environment ... Ideas and information are important, but things matter much more. Yet today's information technology is so dependent on data originated by people that our computers know more about ideas than things. If we had computers that knew everything there was to know about things—using data they gathered without any help from us—we would be able to track and count everything. - Kevin Ashton
  • 7. XIVELY Cloud Based Service Users send JSON, XML or CSV to a RESTful API Amalgamates data from around the world and stores it Data is also accessible through AJAX requests
  • 8. WHAT CAN YOU USE THE INTERNET OF THINGS FOR? MONITORING AN ENVIRONMENT Moderating the temperature in your house Making sure you're not being broken in to REACTING TO DATA FROM AN ENVIRONMENT Printing out the news every morning Flashing a light when someone enters a room ... ... on the other side of the world
  • 9. BERG'S LITTLE PRINTER
  • 10. PHILIPS HUE LIGHTS
  • 11. MAKE THE COSM Pulls from Xively based on a user defined search term Data is updated in real time User can use the data provided to trigger sounds
  • 12. STRAVA Gathers data about your surrounding area Transfers this data to a server which aggregates Server reacts to the data you post
  • 13. ARDUINO
  • 14. WHAT IS AN ARDUINO? Open Source Microcontroller board with addressable GPIO pins Various form factors depending on need Communicates with electronics using GPIO pins
  • 15. GUH-PEE-OH WHAT? General Purpose Input and Output Can be used to receive and transmit current to electronic components Can also be used to pass messages to serial input Are how the Microcontroller talks to the outside world
  • 16. PINS ON THE ARDUINO Normal pins which can be set high or low Analogue and PWM Pins Analogue pins which can read values between 0 and 1023 PWM Pins can be set to values between 0 and 255
  • 17. WARNING WINDOWS USERS You will have to bypass windows security to install drivers for the Arduino. Drivers are unsigned by Arduino As such, you will need to disable Driver Signature Checking
  • 18. S.H.I.E.L.D.S. Not a comic law enforcement agency (in this case) Add on to an Arduino which extends functionality Can be stacked, but some care does need to be taken
  • 19. S.H.I.E.L.D. REQUIREMENTS Plugs to the non-GPIO pins need to reach all shields. Each shield will have outputs which need to be left unconnected to. Outputs to the Arduino need to be unique.
  • 20. PROGRAMMING AN ARDUINO Breaks down in to two main types Code that is compiled to C / C++ and uploaded to the microcontroller Code that communicates with the board and issues commands
  • 21. BREAKOUT JS; WHAT? Javascript based framework Can be ran in a web page Needs Arduino to be connected to a computer Needs a server to run on your computer Resulting web page can be connected to from any device on the local network
  • 22. BREAKOUT JS; HOW? Install the Firmata firmware Open the file located in the Breakout zip in the firmware folder Upload it to the board using any compatible IDE
  • 23. BREAKOUT JS; INSTALLING THE SERVER Depends on which server you want to install; Java or Node
  • 24. USING THE JAVA SERVER Unzip the folder relevant to your Operating System MacOS, Linux, Windows x32 & x64 Run the resulting Executable
  • 25. USING THE NODE SERVER Install NodeJS Navigate to the node_server folder in command line Run “npm install” to install all dependencies “node server.js” starts the server
  • 26. WHAT THE API LOOKS LIKE Classes for most things you would connect to an Arduino Mixed in amongst normal Javascript and HTML BO and JSUTILS namespacing
  • 27. BO.I2CBase, BO.IOBoard, BO.IOBoardEvent, BO.PhysicalInputBase, BO.Pin, BO.PinEvent, BO.WSocketEvent, BO.WSocketWrapper, BO.custom.ID12RFIDReader, BO.custom.RFIDEvent, BO.filters.Convolution, BO.filters.FilterBase, BO.filters.Scaler, BO.filters.TriggerPoint, BO.generators.GeneratorBase, BO.generators.GeneratorEvent, BO.generators.Oscillator, BO.io.AccelerometerADXL345, BO.io.AccelerometerEvent, BO.io.AnalogAccelerometer, BO.io.BiColorLED, BO.io.BlinkM, BO.io.Button, BO.io.ButtonEvent, BO.io.CompassEvent, BO.io.CompassHMC6352, BO.io.DCMotor, BO.io.GyroEvent, BO.io.GyroITG3200, BO.io.LED, BO.io.MagnetometerEvent, BO.io.MagnetometerHMC5883, BO.io.PotEvent, BO.io.Potentiometer, BO.io.RGBLED, BO.io.Servo, BO.io.SoftPot, BO.io.SoftPotEvent, BO.io.Stepper, JSUTILS.Event, JSUTILS.EventDispatcher, JSUTILS.SignalScope, JSUTILS.Timer, JSUTILS.TimerEvent
  • 28. HELLO WORLD EXAMPLE vrIBad=B.Oor; a Oor OIBad vrIBadvn =B.OorEet a OorEet OIBadvn; vrLD=B.oLD a E Oi.E; vrBto =B.oBto; a utn Oi.utn vrBtoEet=B.oBtoEet a utnvn Oi.utnvn; vrhs =wno.oainhsnm; a ot idwlcto.otae / i tefl i oee lcly sttehs t "oahs" / f h ie s pnd oal, e h ot o lclot i (idwlcto.rtclidxf"ie" ==0 { f wno.oainpooo.neO(fl:) = ) hs ="oahs" ot lclot; } vradio=nwIBadhs,88) a run e Oor(ot 87; adioadvnLsee(OorEetRAY oRay; run.dEetitnrIBadvn.ED, ned) fnto oRayeet { ucin ned(vn) / Rmv teeetlsee bcuei i n lne nee / eoe h vn itnr eas t s o ogr edd adiormvEetitnrIBadvn.ED,oRay; run.eoevnLsee(OorEetRAY ned) vrld=nwLDadio adiogtiiaPn1); a e e E(run, run.eDgtli(1) bto =nwBto(run,adiogtiiaPn2) utn e utnadio run.eDgtli(); bto.dEetitnrBtoEetPES oPes; utnadvnLsee(utnvn.RS, nrs) bto.dEetitnrBtoEetRLAE oRlae; utnadvnLsee(utnvn.EES, nees) $'bnet)o(cik,trLdf) (#tLf'.n'lc' uneOf; $'bnih'.n'lc' trLdn; (#tRgt)o(cik, uneO) }
  • 29. HELLO WORLD EXAMPLE fnto trLdnet { ucin uneO(v) / Tr teLDo / un h E n ldo(; e.n) } fnto trLdf(v){ ucin uneOfet / Tr teLDof / un h E f ldof) e.f(; } fnto oPeset { ucin nrs(v) / gtarfrnet tebto ojc ta frdteeet / e eeec o h utn bet ht ie h vn vrbn=ettre; a t v.agt $'sae)hm(Bto "+bnpnubr+"sae Pesd) (#tt'.tl"utn t.iNme tt: rse"; } fnto oRlaeet { ucin nees(v) / gtarfrnet tebto ojc ta frdteeet / e eeec o h utn bet ht ie h vn vrbn=ettre; a t v.agt $'sae)hm(Bto "+bnpnubr+"sae Rlae"; (#tt'.tl"utn t.iNme tt: eesd) }
  • 30. CONNECTING TO THE INTERNET WITH BREAKOUTJS BreakoutJS runs in a web page Treat it like any other Javascript Library XMLHttpRequest() is something you can use Or jQuery.ajax() if you prefer! No extra shields needed to extend functionality
  • 31. WHAT WOULD YOU USE BREAKOUTJS FOR? Large scale hacks which need monitoring Systems which you can adjust over an internal network Setting the colour of lights using a colour picker Monitoring the heating and adjusting a thermostat Deciding which person to administer an electrical shock to
  • 32. JOHNNY FIVE
  • 33. JOHNNY FIVE; WHAT? NodeJS based framework Needs the Arduino connected to the computer running Johnny Five
  • 34. JOHNNY FIVE; HOW? Upload the "StandardFirmata" Arduino example to your Arduino Install NodeJS Pick a directory nmisaljhn-ie p ntl onyfv
  • 35. WHAT DOES THE API LOOK LIKE? Creating instances of hardware objects and passing initiation properties vrsro=nwfv.ev(0; a ev e ieSro1) servo.min(), servo.max(), servo.center(), move(deg), sweep(deg)
  • 36. HELLO WORLD EXAMPLE vrfv =rqie"onyfv",bto,ld ltol a ie eur(jhn-ie) utn e, iBo; vrbad=nwfv.or(; a or e ieBad) bado(ray,fnto( { or.n"ed" ucin) /Oc tebadi rayadteclbc frs yu cd ge hr! /ne h or s ed n h alak ie, or oe os ee ltol=fle iBo as; ld=fv.e(3; e ieLd1) bto =nwfv.utn8; utn e ieBto() bto.n"on,fnto( { utno(dw" ucin) i(iBo = fle{ fltol = as) ldof) e.f(; }le es{ ldo(; e.n) } ltol=!iBo; iBo ltol }; ) bto.n"od,fnto( { utno(hl" ucin) ldsrb(; e.toe) }; ) }; )
  • 37. CONNECTING TO THE INTERNET WITH JOHNNY FIVE Johnny Five is just a Node package Treat it like any other Node Library Connecting to API's is the same as you normally would with NodeJS No extra shields needed either!
  • 38. WHAT WOULD YOU USE JOHNNY FIVE FOR? Autonomously monitoring and adjusting Inteligently regulating an aquarium Building a little robot to intelligently avoid walls Letting twitter decide who to administer a shock to
  • 39. The Internet of Things is already here! No concrete definition; make it your own We can take part with (relative) ease BreakoutJS : Watch and control your environment Johnny Five : Control your environment with AI
  • 40. THANK YOU! I'VE BEEN; ALEX ROCHE @ALEXHACKED