Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Connecting electronic to an Android

Lars Gregori
September 25, 2014

Connecting electronic to an Android

Presentation for the GDG Android Meetup in Munich using Android and an IOIO board.

Lars Gregori

September 25, 2014
Tweet

More Decks by Lars Gregori

Other Decks in Programming

Transcript

  1. Agenda IOIO Board IOIO Tree + Code "Cameron Highland Tea

    Plantation 2012" by Bjørn Christian Tørrissen Own work by uploader http://bjornfree.com/galleries.html. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons http://commons.wikimedia.org/wiki/File:Cameron_Highland_Tea_Plantation_2012.JPG#mediaviewer/File:Cameron_Highland_Tea_Plantation_2012.JPG
  2. Accessory Development Kit (ADK) Android Open Accessory (AOA) protocol http://developer.android.com/tools/adk/index.html

    Android Debug Bridge (adb) http://developer.android.com/tools/help/adb.html "Ethernet Connection" by Someone's Moving Castle Template:Revathi. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons http://commons.wikimedia.org/wiki/File:Ethernet_Connection.jpg#mediaviewer/File:Ethernet_Connection.jpg
  3. Agenda IOIO Board IOIO Tree + Code "Cameron Highland Tea

    Plantation 2012" by Bjørn Christian Tørrissen Own work by uploader http://bjornfree.com/galleries.html. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons http://commons.wikimedia.org/wiki/File:Cameron_Highland_Tea_Plantation_2012.JPG#mediaviewer/File:Cameron_Highland_Tea_Plantation_2012.JPG
  4. public class IOIOTreeLooper implements IOIOLooper { @Override public void setup(IOIO

    ioio) { leds[0] = ioio.openDigitalOutput(10); // … leds[6] = ioio.openDigitalOutput(5); photoresistor = ioio.openAnalogInput(44); } @Override public void loop() { … https://www.flickr.com/photos/le-topographe/4510450751
  5. @Override public void loop() { float voltage = photoresistor.getVoltage(); leds[i].write(false);

    leds[i].write(true); https://www.flickr.com/photos/le-topographe/4510450751