An alternative to the Raspberry Pi 3
C Applications
Programming in C is fairly well documented, and an ODROID "C Tinkering Kit" is sold separately. The WiringPi library is used in C applications. Listing 3 is a C version of the Python code in Listing 2. It is important to note that these two examples talk to the same physical pins, but the C WiringPi library uses the ODROID-C2 wPi numbers, whereas the Python RPi.GPIO library uses the Pi BCM numbers.
Listing 3
led.c – Read/Write Example
To compile and run the program in Listing 3, enter
$ gcc -o led led.c -lwiringPi -lpthread $ sudo ./led
in a terminal.
A Streaming Video Server Example
The ODROID-C2 does not have a camera serial interface (CSI) port like the Raspberry Pi, but you can use generic USB webcams. I built two identical video servers using Lego Pi cases and some added Lego blocks to secure the USB webcam and cables (Figure 5).
Some good video server software options are available. I like to use motion
, because it is super-easy to set up. To install it, enter:
sudo apt-get install motion
Once motion
was installed on both my RPi3 and ODROID-C2, my goal was to try and run both systems at 800x600 resolution with 24 frames/second (fps) refresh and see how the performance varied. For this setup, I edited some parameters in /etc/motion/motion.conf
(Listing 4).
Listing 4
/etc/motion/motion.conf
To run the video server, enter:
sudo motion
The motion
package has a built-in web server that you access at http://<your_ip>:8081 (Figure 6).
The RPi3 had issues trying to stream 24fps, and the video would often freeze up. The faster specs of the ODROID-C2 allowed for near perfect real-time video streaming. To get a quick check on the differences in performance, I used the vmstat command-line tool on the RPi3 and ODROID-C2 (Listing 5).
Listing 5
Performance Check with vmstat
The ODROID-C2 was running at 97% idle time (id) compared with the Pi's 74%. Probably one of the biggest performance differences was the time the CPU was waiting for I/O (wa, 18% for the PI compared with 0% for the ODROID-C2). The ODROID-C2 was the clear winner as a live-streaming video server.
Summary
Being able to reuse some of my Pi cases and prototyping HATs with the ODROID-C2 was nice. As a Pi user, I found that coding in C, Python, and Node-RED on the ODROID-C2 was fairly easy, although with many limitations compared with the Pi platform. The ODROID wiki had key product documentation, but it was nowhere near the incredibly rich documentation that exists with Raspberry Pi modules.
Some excellent Python libraries and Pi hardware add-ons that support a variety of sensors and I/O applications might or might not work with the ODROID hardware.
During the development cycle of a project, it is nice to have a fast interface, but typically my final projects do not need any high-end processing, and they can often run on Raspberry Pi 1 modules. For now, I would stick to a Raspberry Pi for GPIO/hardware projects.
I enjoyed playing with the ODROID-C2. For projects requiring higher performance, such as video servers and graphic or web applications, the ODROID-C2 module is definitely worth considering.
Infos
- ODROID website: http://www.hardkernel.com
- ODROID wiki: https://wiki.odroid.com
- Node-RED: https://nodered.org
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.