====== ODROID-SHOW examples ======
Download ODROID-SHOW source code first.\\
Then connect microUSB cable to the Host PC with ODROID-SHOW.\\
Finally check the serial port number and run bash shell script file.
** The DTR reset jumper should not be connected to ODROID-SHOW Except in case of writing a firmware. **
{{http://dn.odroid.com/homebackup/show2_boarddetail.jpg}}
===== Download ODROID-SHOW source code =====
sudo apt-get install git
git clone https://github.com/hardkernel/ODROID-SHOW
===== C example =====
==== Basic tutorial ====
** This tutorial is compatible firmware version 2.0 so if it isn't 2.0, update your firmware on ODROID-SHOW **
...
int serialSetup(void)
{
...
}
void writeData(int fd, char *str)
{
...
}
int main(int argc, char **argv)
{
...
writeData(usbdev, "Hello ODROID-SHOW");
return 0;
}
==== Show your ODROID's Stats ====
This linux c source code show the ODROID’s stats and clock.
Check your serial port.
ls /dev/ttyUSB*
To run this program, you need to compile.
gcc -o status status.c
sudo ./status
{{:en:procstat.jpg?400|}}
===== Bash example =====
This bash script can display 2 text strings with different color and different font size.\\
Open the “/dev/ttyUSBn” port and sending VT100/ANSI commands with a couple of strings.\\
It also changes the color of strings.
==== Basic tutorial ====
** This tutorial is compatible firmware version 2.0 so if it isn't 2.0, update your firmware on ODROID-SHOW **
#!/bin/bash
...
function programExit()
{
...
}
...
writeData()
{
...
}
writeData "\ec"
writeData "Hello ODROID-SHOW"
...
==== Text output ====
check your serial port
ls /dev/ttyUSB*
Modify the serial port path "/dev/ttyUSB0" or "/dev/ttyUSBn"
cd ODROID-SHOW/example/linux
vi ODROID.sh
Run
sudo ./ODROID.sh
{{:en:odroid.sh.jpg?300|}}
==== Image display ====
You can display a graphic image on the ODROID-SHOW.\\
It supports only raw RGB-565 format.
We used ffmpeg to convert a normal PNG file to raw RGB file. Note that you must resize the PNG file first.
sudo apt-get install ffmpeg
You can convert it with this command. If the conversion is success, you will have the penguin.raw file.
ffmpeg -vcodec png -i penguin.png -vcodec rawvideo -f rawvideo -pix_fmt rgb565 penguin.raw
You can set the image load mode with the pixel coordination parameters.
Check your serial port
ls /dev/ttyUSB*
Modify the serial port "/dev/ttyUSB0" or "/dev/ttyUSBn"
cd ODROID-SHOW/example/linux
vi images.sh
Run
sudo ./images.sh
{{:en:penguin.jpg?300|}}