Hello,
Thanks for your great work. Unfortunately I am not able to setup your script to work as it should. I tried debug = 1 to get a hint and to see output of you script.
I'am using it together with the Arduino Leonardo Pro Micro (like lotusalex2000). This works, the Micro is sending the right values. I keep the Analog Pin connected to 5v first of all.
As long as the Micro is not connected to the RaspberryPi, the (Serial Port ACM0 / 1 / 2 not found) loop shows up on screen.
When i connect it, I see your battery symbol on top of my screen, I see values for the voltage (ret) but, now starts the trouble, only six times and nothing else, only cursor.
Like this
Code: Select all
Serial Port ACM0 not found
Serial Port ACM1 not found
Serial Port ACM2 not found
5,1
5,1
5,1
5,1
5,1
5,1
_
when i try "screen /dev/ttyACM2 115200" I see the serial values from the Micro for my Voltage (1023 for 5V). When I change the voltage, i see the right values, too, eg. 0Vs shows 0 and so on. So this works.
Only the loop stops, it wont change to Volts<25 when i try 0Vs on the Analog Input, it wont shutdown, only blinking cursor.
When I reboot the same. It will do the shutdown-script, when I reboot with 0V connected
thanking you in anticipation for helping