I’m trying to setup a GPIO via I2C to OSC supervised by a systemd service. The GPIO→I2C is assured by the 16 in|out PCF8575→I2C chip. It is directly connected to the expansion port right in the front of the zynthian V5.
Python seems a good way to go about this. The pcf8575 module is not available on a vanilla zynthian install so I tried : pip3 install pcf8575 and got a warning about using venv (which of course is a good idea) but then my question is : what would be the recommended way to go about this ? The goal I suppose would be for the service to be started in a venv ? Can any of you shed some light on good practice on this zynthian os ?
e.g. : Should this service be run by the zynthian user (or root ())?
This seems to work. ln -s /home/zynthian/gpio-i2c-osc/gpio-i2c-osc.service /etc/systemd/system/ systemctl enable gpio-i2c-osc.service rebooted
and everything works. The service file contains :
Do you guys think I could just git reset --hard in these repository /zynthian/zynthian-{ui,sys,webconf,data} ? I swear, I haven’t done any shenanigans… no idea how I got there. Very weird. I do not know how the Zynthian updates itself and of course, it does its load of git incantations during that.
But that would assume I do have diverging (div. from vangelis) commits that I want to keep and go forward like this but it is not my case. I (suppose I) want a vanilla (unaltered) vangelis repo.
Anywho, I did the very risky git reset --hard origin/vangelis on these repositories /zynthian/zynthian-{ui,sys,webconf,data} followed by an update, rebooted and… everything went fine, all is fine.