So we bought an Arduino board and a few accessories to test it.
To enjoy the development of Arduino with ODROID, I prepared below items.
Hardware
1. ODROID-X2 or X or U2 or XU (PSU, SD or eMMC, HDMI monitor/cable, Keyboard/Mouse)
2. Arduino Uno R3 ( http://arduino.cc/en/Main/ArduinoBoardUno ) + USB Cable
3. LCD + Keypad shield board ( http://www.dfrobot.com/wiki/index.php/A ... Pad_Shield )
4. DHT11 Humidity and Thermometer sensor ( http://www.adafruit.com/products/386 ). I should solder a few wires and a resistor.
Software
1. Ubuntu 13.04 with Kernel 3.8
2. Oracle JDK8 for ARM-HardFloat ( http://forum.odroid.com/viewtopic.php?f=52&t=204 )
I used robroyhall's "Lubuntu 13.04 Whisper" OS image because it has the Oracle JDK pre-installed. Yes, I'm lazy.

Boot your ODROID and plug the Arduino Uno board via USB cable.
And you can see the device node of Arduino serial port.
Code: Select all
odroid@odroid:~$ ls /dev/ttyACM0
/dev/ttyACM0
Install the Arduino IDE (Sketch).
Code: Select all
sudo apt-get update
sudo apt-get install arduino
Run the Arduino IDE and configure the Serial port to upload the compiled code to Arduino board. I made a simple test code.
Code: Select all
#include <LiquidCrystal.h>
#include <dht.h>
/*******************************************************
This program will test the LCD panel, the buttons
and the Humidity/Temperature sensor
Version : 0.1
Date : 20-Oct-2013
By Hardkernel
********************************************************/
// for Digital Humidity and Temperature sensor (DHT11)
dht DHT;
#define DHT11_PIN 3
// Global variables
unsigned long elapsed_time;
// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
// define some values used by the panel and buttons
int lcd_key = 0;
int adc_key_in = 0;
#define btnRIGHT 0
#define btnUP 1
#define btnDOWN 2
#define btnLEFT 3
#define btnSELECT 4
#define btnNONE 5
// read the buttons
int read_LCD_buttons()
{
adc_key_in = analogRead(0); // read the value from the sensor
// my buttons when read are centered at these valies: 0, 144, 329, 504, 741
// we add approx 50 to those values and check to see if we are close
if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
if (adc_key_in < 50) return btnRIGHT;
if (adc_key_in < 195) return btnUP;
if (adc_key_in < 380) return btnDOWN;
if (adc_key_in < 555) return btnLEFT;
if (adc_key_in < 790) return btnSELECT;
return btnNONE; // when all others fail, return this...
}
void setup()
{
// initialize serial communication at 115200 bits per second:
Serial.begin(115200);
lcd.begin(16, 2); // start the LCD library
lcd.setCursor(0,0);
lcd.print(" Hello, ODUINO! "); // print a simple message
// 1234567890123456
delay(1500); // Splash for 1.5 second
Serial.println("ODUINO TEST PROGRAM ");
Serial.println();
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
elapsed_time = millis()/1000; // Returns the number of milliseconds since the Arduino board began running the current program.
}
void loop()
{
lcd.setCursor(0,1); // move to the begining of the second line
lcd.print("KEY :");
lcd.setCursor(6,1); // move to the begining of the second line
lcd_key = read_LCD_buttons(); // read the buttons
switch (lcd_key) // depending on which button was pushed, we perform an action
{
case btnRIGHT:
{
lcd.print("RIGHT ");
Serial.println("RIGHT ");
break;
}
case btnLEFT:
{
lcd.print("LEFT ");
Serial.println("LEFT ");
break;
}
case btnUP:
{
lcd.print("UP ");
Serial.println("UP ");
break;
}
case btnDOWN:
{
lcd.print("DOWN ");
Serial.println("DOWN ");
break;
}
case btnSELECT:
{
lcd.print("SELECT");
Serial.println("SELECT ");
break;
}
case btnNONE:
{
lcd.print("NONE ");
break;
}
}
// Read & Display the humidity / temperature data every 1 second (approx.)
if(elapsed_time != millis()/1000)
{
elapsed_time = millis()/1000;
Serial.print("DHT11, \t");
int chk = DHT.read11(DHT11_PIN);
switch (chk)
{
case DHTLIB_OK:
Serial.print("OK,\t");
break;
case DHTLIB_ERROR_CHECKSUM:
Serial.print("Checksum error,\t");
break;
case DHTLIB_ERROR_TIMEOUT:
Serial.print("Time out error,\t");
break;
default:
Serial.print("Unknown error,\t");
break;
}
// DISPLAY DATA
Serial.print(DHT.humidity,0);
Serial.print(",\t");
Serial.println(DHT.temperature,0);
lcd.setCursor(0,0); // move cursor to second line "1" and 9 spaces over
lcd.print("HUMI:");
lcd.print((int)(DHT.humidity));
lcd.print("%");
lcd.print(" TEM:");
lcd.print((int)(DHT.temperature));
lcd.print("C");
}
delay(50); // delay 50 msec.
}
Download dht.cpp and dht.h from below link and copy them into "/home/odroid/sketchbook/libraries/dht".
http://playground.arduino.cc/Main/DHTLib
I should restart the Arduino IDE after copying to use the library.
If you run the test code on the Arduino,
- Read the DHT sensor and show the Humidity and Temperature on LCD
- Read the keypad and show the pressed keypad
- Send the data to ODROID via Serial port (USB) DHT11 uses one-wire communication and I connected it to the digital Pin#3 of Arduino.
Also note that I also added a 4.7K~5Kohm pull-up resistor on that pin.

See photo : Connections are (V)oltage, (S)ignal, (G)round

NOTE: Needs 4.7K to 10K pullup resistor from +5 to Signal pin
- Full range of calibration, in-line digital output;
- Humidity measuring range: 20% ~ 9 0% RH (0-50 ? temperature compensation)
- Temperature measuring range: 0 ~ +50 ?C ;
- Humidity measuring accuracy: 5.0% RH
- Temperature measurement accuracy: 2.0 C
- Response time: <5S ;
- Low power consumption
ODROID meets Arduino

We will make an example code with the Qt library to show the Humidity and Temperature graphically on ODROID.
I will also try the Android platform as well as Linux platform.
Stay tuned !