Android ThingsLib (ODROID C2): I/O, I2C, PWM, Servo, Motor

Updated (28.03.2018): v2.2, fixed I2CPort for some examples, also ready to use native libs in the “libs” folder (you don’t need to compile NDK files anymore for your projects)

Hint: please use Android 5.1.1 v1.9 (242) only (with > v1.9 the PWM Pins are not working!)

Apart from my mac, no product could excite me so rarely as the new ODROID C2 IMG_20160630_021838012
Board. Previously some manufacturers tried to bring the Android and Arduino world together, but they failed. It was working somehow and after sometime, but it was no fun to use. Sometimes it was Android, sometimes Arduino. The effort to implement any project with these two platforms was often high, and often more than annoying.


Long story short … ODROID C2 is the solution. First, it surprised me that the current Android version 5.1.1 (Hardkernal Android Version 1.9 (242) ) simply works. I am often quite picky … but everything I tried, worked right away:

  • USB 720P Cam (29€)
  • Dell 24″ Touchscreen (HDMI + USB)
  • I2C RTC DS3231
  • PWM Servo
  • USB Wifi Dongle (EDIMAX)
  • USB Bluetooth Dongle (LogiLink)
  • USB Soundblaster


The Hardkernel website is showing the reason. Every 7-14 days a new Android update. The guys are working for so long on a problem until it is solved. The result is the roundest result what I’ve seen with android boards so far. Then I’ve written the ODROID C2 Android Library with NDK code (for this you need the Hardkernal Android 1.9 Version – Android 5.1.1) that accesses the 40-pin plug connector, to make everything possible from the Arduino world in the Android World:


Supported stackable HAT Boards (I2C):

  • Sense HAT / Astro Pi  *New*
  • GrovePi+ HAT *New*  with GroveLib – a lot of ready to use Grove Modules
  • Adafruit Servo HAT (992 Servos)
  • Adafruit Motor HAT (128 Motors, 64 Steppers)
  • Adafruit RGB LCD Display 1602 (16×2) HAT
  • Digital I/O HAT with MCP23017 Chip
  • PiUSV+ HAT (
  • TouchHDMI 800×480 XPT2046 SPI Board


Supported other Boards:

  • ADS 1015 I2C Board 6 Analog Pins,
  • OLED Display 1306 I2C Board
  • OLED Display 1306 SPI Board
  • OLED RGB Display 1351 SPI Board
  • LCD Display Nokia 5110/3310 PCD8544 SPI 84×48
  • Realtime Clock DS3231
  • NFC PN532 (UID Read)  I2C Board  *New*  
  • Colorduino (I2C) incl. Firmware-Uploader (ISP/SPI)  *New*


Other functions:

  • KeyMatrix support (with or without Digital I/O HAT | MCP 23017 chip)
  • Native USB Keyboard and Mouse Listener with “Device Grab” option
  • Changeable Boot-Logo and Boot-Animation
  • Rotary Encoder Support
  • NetWS2812 Support with Arduino UNO or Mega with Ethernet Shield  *New*


I2C Sensors:

  • Barometer BMP180 (+ Temperature)
  • Humidity HTU21D (+ Temperature)
  • Humidity HDC1000 (+ Temperature)
  • Luxmeter TSL2561
  • UVmeter SI1145



Update to v30 (21.12.2016):

I’ve rewritten the GrovePi+ Library completely and added a lot of new features. After the App start it will check the GrovePi+ Firmware. If the Firmware is < 2.00 then the app will start a Firmware-Update automatically (you will see some Firmware update text lines, the Firmware update need ~1 min). The Firmware 2.00 is compatible to the old Firmware 1.22


Supported Grove Modules:

  • Analog Air Quality
  • Analog Joystick
  • Analog Rotary Angle Knob
  • Analog Slider
  • Analog Sound Sensor
  • Digital 4 Digit Display
  • Digital Button
  • Digital Buzzer
  • Digital Dust Sensor
  • Digital Ear Clip Heart Rate Sensor
  • Digital IR Receiver/Transmitter R/C (Learn/Send)
  • Digital LED
  • Digital LED Bar
  • Digital LED Strip Driver *New*
  • Digital Relais
  • Digital RGB Chainable LEDs
  • Digital Rotary Encoder
  • Digital Speaker
  • Digital Switch
  • Digital Temperatur Humidity Sensor
  • Digital PIR Sensor
  • Digital Ultrasonic Sensor
  • Digital Vibration Motor
  • Digital WS2812 LED Strip *New*
  • I2C ADC
  • I2C Barometer BMP 180
  • I2C Baromoter  BMP 280
  • I2C Colorduino incl. Firmware-Uploader (ISP/SPI)  *New*
  • I2C LCD RGB Background Display
  • I2C Light Sensor TLS 2561
  • I2C Motor Driver / Stepper
  • I2C MPU 9250 Accelerometer/Gyro
  • I2C OLED 128×64 Display
  • I2C OLED 96×96 Display
  • I2C RTC 1307
  • I2C RTC 3231
  • I2C Servo-Board Mini (Adafruit)
  • I2C Temperature Humidity HDC1000
  • Serial Fingerprint Sensor



   img_20161208_013306596   img_20161208_013339139      
   IMG_20160621_010044719     IMG_20160625_132527437
IMG_20160625_132517553   IMG_20160626_050155983   IMG_20160630_021838013
IMG_20160626_234644517   IMG_20160630_021838012   IMG_20160712_065414957
IMG_20160714_242611376   IMG_20160710_192912417   IMG_20160720_030748127   IMG_20160720_030913286   IMG_20160720_030951850   IMG_20160720_031020147
IMG_20160721_182014129   IMG_20160726_210844225   IMG_20160728_234807628        



If you want to use the board as Arduino/Respberry Pi replacement, then you can save power when you reduce the CPU Frequency with the onboard Android “ODROID Utility” to 1 Ghz and switch the CPU Governor to “Hotplug“. Then you don’t need the Heatsink! The power consumption will fall to 1,5 Watt (5,15V / 0.3A) and the CPU temperature will show ~37°C (100° F).