I want to combine the Ryanteck RTk.GPIO https://uk.pi-supply.com/products/ryanteck-rtk-gpio-pc-gpio-interface with the Raspberry Pi Power Monitor project https://github.com/David00/rpi-power-monitor for use with a server (not a pi)
While the two boards physically fit, I didn't realise that the Power Monitor HAT uses SPI rather than GPIO.
Is there a way for me to alter the rpi-power-monitor python code to work with the RTk.GPIO board?
I don't know anything about SPI, but my searches talk about bitbanging via the GPIO?!
Hints welcome :)
#python #raspberrypi
@bigcalm @alex based on a quick look, the RTK.GPIO is just using a microprocessor (STM32) on the 3nd of a USB interface. To Linux sends USB commands to STM32 to twiddle the pin states. You don't want to bit bang SPI unless you really have to, especially from userspace in Linux. The power monitor board will be using SPI to be able to poll the ADC relatively fast, making bit banging SPI via emulated GPIO poor.
@intrbiz I love open source projects.
https://github.com/david00/rpi-power-monitor/wiki/Schematic
It is feasible to wire in a USB to SPI adaptor on the documented pins.
Might punt a few more quid to finding a suitable adaptor to see if I can get it to work.
If that fails, it'll be a case of sticking with the Pi and using external SSD storage for the near constant data writing.
Could even boot from the USB SSD for more reliability.
@bigcalm @alex the STM32 will almost certainly have a SPI controller. However that will require writing custom firmware. Probably better off looking for a USB SPI dongle. Or just using the power monitor board with a PI Zero or similar. Or building a custom SPI interface.