One of the biggest features that the ODROID-C1 (odroid, from now on) has that is different than the Raspberry Pi B+ is the ADC. This is a welcome addition and will allow you to interface with analog sensors in a very simple way.
I figured I would use a photocell since I just finished doing a photocell blog project for the B+, so everything was in place.
The first thing I did was log into my odroid, and from my home directory type the following commands:
git clone https://github.com/hardkernel/wiringPi cd wiringPi/ ./build
This built and installed the wiringPi library on my odroid.
Next I opened my favorite code editor (not really, but I installed a pretty cool ide from the Lubuntu Software Store, CodeLite) and entered the following code:
#include <stdio.h>
#include <time.h>
#include <wiringPi.h>
#define PORT_ADC1 0
int main (int argc, char *argv[])
{
static int timer = 0 ;
int adcValue;
wiringPiSetup();
for(;;) {
if (millis () < timer) continue ;
timer = millis() + 100;
adcValue = analogRead(PORT_ADC1);
printf("Value read is %d\n", adcValue);
}
return 0 ;
}
I attached the code below.
time to hook up the circuit:
I connected pin 1 of the Odroid to the + power rail on my breadboard
Pin 6 to the - Power rail
straddled a 1K resistor (any value will work) from the - rail to row 10
straddled a photocell over the channel in the middl on row 10
connected a jumper from the power rail to row 10 on the right side of the channel
connected a jumper from pin 40 of the odroid to row 10 of the bread board right between the photocell and the resistor
see the image below:
then I typed:
gcc -o photoSensor photoSensor.c -lwiringPi -lpthread
and finally:
sudo ./photoSensor
this gave me an ouput as follows:
That was with me waving my hand all above the sensor.
This is what the finished product looked like:
This wasn't intended to be a sophisticated project of any kind, just a quick example of how to use the ADC and the wiringPi libraries on the ODROID-C1.



Top Comments