Page 4 of 5
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Wed Jun 14, 2017 2:55 am
by krevett
activex wrote: ↑Sat Jun 10, 2017 2:05 am
krevett wrote: ↑Wed Jun 07, 2017 1:20 am
1/ On this picture, we can see a grey wire connected to #21 on pi gpio, but going nowhere. Do you have an explanation?
Just an editing error, its not supposed to be there in the first place
krevett wrote: ↑Wed Jun 07, 2017 1:20 am
2/ Your white wire is going to CS0 pin, but I can't find it on this GPIO chart ? Does-it correspond to SPI_CE0_N (gpio 8/pin24) ?
I don't have a RPi3, so cant answer that, but try googling RPI 3 SPI.
Thanks for your answer !
It looks to be the same for the SPI_CE0_N. I'll have a try in the beginning of july (I'm waiting for parts).
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Tue Jun 27, 2017 7:06 am
by jostie94
Does anyone have an idea what I'm doing wrong?
I do don't know anymore
pi@retropie:~/gbzbatterymonitor $ python main.py
Batteries 100% voltage: 4.1
Batteries 75% voltage: 3.76
Batteries 50% voltage: 3.63
Batteries 25% voltage: 3.5
Batteries dangerous voltage: 3.2
ADC 100% value: 937.441786284
ADC 75% value: 859.702711324
ADC 50% value: 829.978947368
ADC 25% value: 800.255183413
ADC dangerous voltage value: 731.661881978
/home/pi/raspidmx/pngview/pngview: error while loading shared libraries: libraspidmx.so.1: cannot open shared object file: No such file or directory
ADC value: 313 (1.36893833705 V)
ADC value: 311 (1.36019112723 V)
^Cpngview: no process found
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Thu Jul 13, 2017 11:35 am
by tinkerBOY
jostie94 wrote: ↑Tue Jun 27, 2017 7:06 am
Does anyone have an idea what I'm doing wrong?
I do don't know anymore
pi@retropie:~/gbzbatterymonitor $ python main.py
Batteries 100% voltage: 4.1
Batteries 75% voltage: 3.76
Batteries 50% voltage: 3.63
Batteries 25% voltage: 3.5
Batteries dangerous voltage: 3.2
ADC 100% value: 937.441786284
ADC 75% value: 859.702711324
ADC 50% value: 829.978947368
ADC 25% value: 800.255183413
ADC dangerous voltage value: 731.661881978
/home/pi/raspidmx/pngview/pngview: error while loading shared libraries: libraspidmx.so.1: cannot open shared object file: No such file or directory
ADC value: 313 (1.36893833705 V)
ADC value: 311 (1.36019112723 V)
^Cpngview: no process found
Copy the file libraspidmx.so.1 to /lib directory.
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Thu Jul 13, 2017 11:38 am
by tinkerBOY
The Pngview icon will not appear on the Emulationstation homescreen but appears just fine on any games. Any ideas why?
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Thu Jul 13, 2017 12:49 pm
by HoolyHoo
zeroboy wrote: ↑Thu Jul 13, 2017 11:38 am
The Pngview icon will not appear on the Emulationstation homescreen but appears just fine on any games. Any ideas why?
Perhaps you are not using a layer number that is high enough within the pngview switch to be the upmost layer.
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Thu Jul 13, 2017 7:45 pm
by tinkerBOY
HoolyHoo wrote: ↑Thu Jul 13, 2017 12:49 pm
zeroboy wrote: ↑Thu Jul 13, 2017 11:38 am
The Pngview icon will not appear on the Emulationstation homescreen but appears just fine on any games. Any ideas why?
Perhaps you are not using a layer number that is high enough within the pngview switch to be the upmost layer.
Yeah. I tried to check the layers via:
It looks like emulationstation uses layer 10000 so i just changed pngview's layer to 11000 and everything works now.
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Sun Jul 30, 2017 9:28 pm
by ABH
Awesome
is it possible to use Battery indicator with SPI screen ?
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Mon Jul 31, 2017 12:24 am
by BadBert
Is it possible to use a buttion in the + line to the chip, so it will only display the icon when you push the switch?
i don't like the icon to be always on top....
Also, i have the safe shutdown in it for safety
Can someone tell me how to wire it up to the Pi0?
I see some gpoPin numbers... but i already am using gpoPins 17, 22 and 27 for my safeshutdown...
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Thu Oct 19, 2017 8:48 am
by RocknRollaDE
hello from germany.
looks like i'm having some permission problems.
anyone got a clue how to fix this ?
Code: Select all
pi@retropie:~/gbzbattery $ python main.py
Batteries 100% voltage: 4.1
Batteries 75% voltage: 3.76
Batteries 50% voltage: 3.63
Batteries 25% voltage: 3.5
Batteries dangerous voltage: 3.2
ADC 100% value: 937.441786284
ADC 75% value: 859.702711324
ADC 50% value: 829.978947368
ADC 25% value: 800.255183413
ADC dangerous voltage value: 731.661881978
sh: 1: /home/pi/raspidmx/pngview: Permission denied
ADC value: 860 (3.76130022321 V)
Changed battery icon to 100%
sh: 1: /home/pi/raspidmx/pngview: Permission denied
ADC value: 833 (3.64321289063 V)
Changed battery icon to 75%
sh: 1: /home/pi/raspidmx/pngview: Permission denied
ADC value: 847 (3.70444335937 V)
ADC value: 862 (3.77004743304 V)
directory structure
all directorys are owned by the user pi
/home/pi/raspidmx
/home/pi/raspidmx/pngview
/home/pi/gbzbattery
Re: [GUIDE] Battery icon indicator guide with MCP3008
Posted: Thu Oct 19, 2017 9:08 am
by RocknRollaDE
problem solved!
just edited the root login to gain access with it.
copied the libraspidmx.so.1 to /usr/lib and everything is working fine.