All Blog Posts  |  Next Post  |  Previous Post

Running Miletus on Raspberry Pi alternatives


Friday, May 19, 2023

TMS Software Delphi  Components
If you are familiar with the world of single board computers then you have probably noticed the difficulties when wanting to purchase a Raspberry Pi. This is caused by various component shortages surrounding the Raspberry Pi and the resulting imbalance between demand and supply.

Depending on your project and needs, you might find yourself looking at alternatives after a while. We know we did, and that is how ODROID came under our radar. Let's see how this journey turned out!

What's ODROID?

ODROID is a series of single-board computers and tablet computers created by Hardkernel. They provide both development boards and software. While the name comes from Open + Droid, their hardware boards are actually not open-source. The officially supported operatings systems are Android and Ubuntu. However, there are also a variety of third party images available for download directly from the Hardkernel website.

ODROID vs Raspberry Pi

Both manufacturers have multiple models available to satisfy the different needs, so comparison is something to be done based on what you are looking for in a SBC and it's a matter of figuring out what fits your needs best. Some of the common points to compare are: price, CPU, memory, power requirements, network.

Here's a quick comparison between the 4GB version of Raspberry Pi 4B, ODROID C4 and ODROID N2+ following some of the points above:

Raspberry Pi 4BODROID C4ODROID N2+
CPUBroadcom BCM2711 quad-core
Cortex-A72 @ 1.5 GHz
Amlogic S905X3 quad-core
Cortex-A55 @ 2.0 GHz 
Amlogic S922X
Quad-core Cortex-A73(up to 2.4Ghz) and 
Dual-core Cortex-A53 (up to 2Ghz)
Power5V/3A via USB-C or GPIO header
12V/2A via DC connector
12V/2A via DC connector
OSRaspberry Pi OSAndroid or Linux (Ubuntu)Android or Linux (Ubuntu)
NetworkGigabit Ethernet +
2.4 GHz and 5.0 GHz IEEE 802.11ac Wi-Fi +
Bluetooth 5.0, BLE
Gigabit Ethernet +
Optional WiFi USB adapters
Gigabit Ethernet +
Optional WiFi USB adapters
Price$55 (Adafruit)$54 (Hardkernel)$83 (Hardkernel)

But what does Miletus have anything to do with this?

We were working on a custom project that initially started out on a Raspberry Pi with Miletus. The development was nearing its end when the shortage started and after months of halting we asked ourselves if there was another way  to proceed without having to re-do the whole development from scratch. ODROID surfaced as a potential alternative, so we looked at our requirements and researched what the N2+ board can do:
  • If we install the recommended Ubuntu Mate distribution then we can install WebkitGTK too which is a requirement for Miletus
  • It uses the same GPIO interface we need
  • It can run Lazarus allowing us to recreate the Miletus shell application
And with that we only had a few question marks left that was related to the project itself. To figure out the answer to those, we ordered an ODROID N2+ for testing.

The road to a running application

Once our test device arrived, we downloaded and installed the recommended Ubuntu Mate distribution and started researching our project related question marks. After all, there's no point in progressing further if the ODROID we ordered cannot do what we want to use it for. Fortunately the path to success was looking bright so we proceeded with installing Lazarus and recompiling our Miletus shell application but this time on ODROID. 

We had to spend some time making sure our shell application was functional. Once we could confirm it was all OK, we temporarily replaced our Raspberry Pi shell application with the ODROID shell application. Then we modified our Miletus project so the GPIO was updated to access the correct pin numbers.

Accessing these GPIO pins work the same way on both Raspberry Pi and ODROID, it's only a matter of figuring out which pins to connect to. After selecting the pins, we built the application from the Delphi IDE and copied the resulting packaged application to our ODROID device. Then we verified if all of the pins are accessible. Unfortunately some of them were already in use, so with a few iteration of trial and error and disabling some interfaces we ended up with 16 pins that were free to use. This is the only thing that changed in our project in the end:
  //Raspberry pins:
  //RelayBoardPins: array[1..16] of Byte = (5, 6, 13, 16, 19, 20, 21, 26, 2, 3, 22, 27, 25, 17, 24, 23);

  //ODROID pins
  RelayBoardPins: array[1..16] of SmallInt = (482, 487, 481, 491, 472, 464, 485, 478, 484, 477, 483, 476, 480, 479, 492, 473);
With that our application was up and running once again! And the time we spent on this? About 2-3 days in total including all installation, setup, research and testing. 

You might have already guessed, there is no proper integration for this as it would require additional work. There were also some small Lazarus related issues that needs further investigation. While handling these was not a requirement to wrap up our custom development, it's something that would need to happen in order to bring ODROID as a new target to Miletus. However, the possibility is there!

The ODROID N2+ hardware

Here is a more detailed via on the hardware capabilities of the ODROID N2+ or visit the Hardkernel website for all the details

TMS Software Delphi  Components
TMS Software Delphi  Components

TMS Software Delphi  Components

What do you think?

Would you like us to add support for Linux-based ODROID systems? Do you have perhaps other suggestions in mind? Let us know if this is something you'd like to see pursued further!

Tunde Keller


This blog post has not received any comments yet.

Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.

All Blog Posts  |  Next Post  |  Previous Post