Some developer tips for successfully moving your project from home to the plant floor.
We know a lot of developers love to tinker and prototype projects on Raspberry Pi hardware. I do the same at my house with over 12 Raspberry Pi computers doing different things. It's such an affordable and fun platform with a huge community behind it... what's not to love? The challenge comes when it’s time to move your project from the house/office to the factory floor.
I have seen firsthand how the Pi CPU will speed throttle as soon as it gets a little warm and have personally been on the bad end of microSD card corruption due to heat or ungraceful power cycles. When it comes to the real world, you need to find some tougher hardware to run your code, and that's often where the groov family comes to the top of your Google search results.
The groov hardware is specified for -20 to +70 deg C and uses a power fail safe file system so you have a solid foundation to build on in that regard. As some of the very few automation controllers that both run Linux and offer full shell access, groov EPIC and/or groov RIO are sometimes your only choice to move your shell code project from Raspberry Pi to the factory floor.
But that move can have some challenges of its own. If you are thinking about taking this path, here are a few things to be aware of, along with several resources to help you succeed.
The OS
The most common operating system on the Pi is ‘Raspbian,’ recently rebranded as ‘Raspberry Pi OS,’ a hybrid mix of Debian built for the Raspberry Pi. There are a ton of packages only a pre-built sudo apt-get or just a Git pull and ‘make’ away from getting up and running.
groov hardware on the other hand uses a custom Yocto build of Linux. It's a lean build of pure Linux that does not come with a lot of extra packages like desktops or word processors or USB camera drivers to pick a few examples.
Depending on your code complexity and required packages, you may need to allow a little more time moving from one platform to another. You may find that you need to build a few of the prerequisite libraries from source before you can run your application. This is something to keep in mind as you roll out your shell application that you have built and tested on a Pi and now want to run on groov hardware.
Package dependencies
Oftentimes, you just need to install a package or two in order to get your application up and running. We have a list of the most requested applications here: http://developer.opto22.com/epicdev/shell/.
It's important to remember that all the ‘apt-get’ packages are in the Opto 22 repo, not a public one. This means they are all signed by our crypto key and are sometimes a version or two behind the bleeding edge. This can be a good thing or bad depending on your needs at the time, so just keep it in mind.
If you want to link your EPIC or RIO to your GitHub repository and account, you will need to spin up a certificate and keys for each. Get started by installing the SSH-Agent on your groov hardware by following the Opto 22 forum post here: https://forums.opto22.com/t/epic-groove-ssh-agent-github/3830/.
Language-specific resources
So far, I think it's fair to say that Python has been the most popular language we have seen used on the groov hardware. We have some great resources to get you started on the developer website: http://developer.opto22.com/epicdev/python/.
There are also lots of code examples on our OptoForums. Terry has some great quick start sample code here: https://forums.opto22.com/t/epic-data-using-optommp-with-python/2041.
C++ has also proven to be very popular, and one of our forum users put together a great guide on how to get started with development here: https://forums.opto22.com/t/short-tutorial-on-linux-programming-for-the-epic/3413.
Our main jumping-off site for C++ can be found here: http://developer.opto22.com/cpp/.
Lastly, although not really SSH-specific or hardcore developer material, it is by far and away the most popular tool for data mashups on either EPIC or RIO. Of course, I am talking about Node-RED, and we have the most watched intro video on YouTube to get you started: https://www.youtube.com/watch?v=3AR432bguOY.
Let us know how it goes
If you have completed a migration from Raspberry Pi or other Linux-based systems to groov hardware, we’d love to hear your experiences. Feel free to leave a comment on this blog post, share a post on our forums, or leave a comment on one of our YouTube videos to let us know.
Cheers and happy coding!
-Ben and Terry