Migration of existing code base to RevPI

Topics about the Software of Revolution Pi
Post Reply
jhahn
Posts: 1
Joined: 09 May 2025, 15:19

Migration of existing code base to RevPI

Post by jhahn »

Hi,

The RevPI hardware looks really great and we consider using it for some of our gateways.

Our code base has grown and we'd like to avoid reimplementing everything from scratch. It's mostly Python code, using e.g. asyncio, threads, etc. Concerning interfaces we need access to UART, gpio and network.

Is it possible to import the RevPi functions from the python package and run the code via the standard python interpreter (preferably even in a docker image)?

What I've seen so far is that RevPI has its own framework to run the code. I guess that would mean major modifications on our side.

Best,
Jürgen
User avatar
MFlat
KUNBUS
Posts: 3
Joined: 10 Apr 2025, 16:46

Re: Migration of existing code base to RevPI

Post by MFlat »

Hi Jürgen,

You can reuse some of your Python code on the RevPi Connect 5, meaning UART, Network, Docker and asyncio/threading work unchanged, as our image is based on Debian. However, the native GPIOs are not accessible. Instead of GPIOs, you need additional RevPi expansion modules and have to rewrite your GPIO code to revpimodio. The modules are configured via PiCtory - a different concept than standard GPIO access, but very easy to use.

Michael
Post Reply