Haha, no problem.
RPi3 is fine and will run all this easily, as mine did. I've recently upgraded to a RPi4, but only because I was given one for Xmas. The extra RAM and performance is nice to have, but not really noticeable other than at application start, as it caches the sound files quicker.
Worth noting I've always used the Lite RPi OS versions, IE; no GUI or desktop stack, software etc [
as I'm a masochist and enjoy the command line, lol] so I'd have to try running it on a GUI version on my old RPi3 to see if it holds up, but suspect it'll be OK.
This misses a lot of the finer detail but hopefully acts as a primer to help understand the gibberish*;
'ContainmentOS' is a Python script to be run from the command line. It provides an interface to monitor and directly control the system, and manages the various background services [
which we won't go into here for the sake of everyone's sanity].
I recommend using Tmux (
https://github.com/tmux/tmux/wiki/Getting-Started) to keep the session alive, and it also enables you to split the screen into multiple panes and apply some basic formatting/theming to what is essentially a text-only display (as seen in my last screenshot on the 9th).
ContainmentOS uses and extends the Python module 'GPIO Zero', which allows convenient control of the GPIO pins. They can be set up as an input, IE; a switch, or an output, IE; an LED. The Pi has 40 pins, but some are for power (5v/3v3/ground) and some are reserved/special purpose. There are several different pin numbering schemes, but gpiozero uses 'BCM', so it's best to stick with that.
https://pinout.xyz is an excellent reference.
You can't pull much current from the GPIO pins directly, so whilst you can prototype with basic 5mm LEDs on a breadboard, for a full build you'll probably want to drive 12v LEDs.
The Pi is powered by 5v with only 3v3 logic level (unlike Arduino), so naturally you need to do something to step up to 12v; I use a MOSFET module (such as:
https://amzn.eu/d/71AUPf1), per lighting channel, for a total of 6 channels (3x Trap Ops buttons, instrument illumination and 2x effects). These are each switched by a 3v3 GPIO pin, but output whatever voltage is applied to the Vin; in our case, 12v from a shared 2A supply. [
Vigilance is required with wiring and securing these; I've killed GPIO pins by accidentally shorting the back side - can confirm the RPi doesn't like 12v!]
So far, so good; we can turn our 12v LEDs on and off via code. But at the moment they are either fully on or off. As you're writing code for Arduino you may already be familiar with Pulse Width Modulation - PWM. This allows you to control the brightness by varying the duty cycle of the signal, like flicking a light switch on/off really quickly. Unlike Arduino, the Pi doesn't support hardware PWM on all pins, so the outputs can be a bit twitchy. To resolve this, you'll need to install 'pigpio' from
http://abyz.me.uk/rpi/pigpio/examples.html [
horrible website though!] and configure GPIO Zero to use it.
Great! With the addition of some switches and code to monitor them, we now have the basis for a functional (albeit, basic) ECU electronics and control system! From here you can extend in all sorts of directions...
* or it could be yet more gibberish - sorry, I tried! I just realised we're possibly hijacking this thread, however I hope some of the info may be useful for anyone else wishing to make a GB OS/app, ECU or otherwise;
OP/Mods: please let me know if you'd prefer us to bugger off this thread. (I've been putting off a build thread as I find writing hard, but perhaps the time has come...)