This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Battery monitor
#24
Updated for OP V1.0



***After downloading the attached files and before putting them on your pi change the file type to .py from .txt (cannot put a .py file on forum)***

1.      Create a new a new folder in the /home/pi/.openplotter/tools folder called "voltage_code". To do this first change you directory to the tools folder and then create the file (sudo mkdir /home/pi/.openplotter/tools/voltage_code). Then change the folder owner to pi (sudo chown pi:pi /home/pi/.openplotter/tools/voltage_code)

2.    Once the folder has been created, place the files “voltage_code.py” and “SDL_Pi_INA3221.py” in it. (/home/pi/.openplotter/tools/voltage_code)

3.       In the terminal while in folder /home/pi/.openplotter/tools/voltage_code type “sudo chmod a+x voltage_code.py” to make the code executable

4.       To enable the tool open the OpenPlotter configuration file in /home/pi/.openplotter/openplotter.conf. Go to section [TOOLS] and add:  “, ['INA3221 Sensor', 'Adds INA3221 Sensor to I2C Bus', 'voltage_code', '1']” to py.

Mine looks like this (You can cut and paste this into your config file if you have no other special tools):

[TOOLS]

py = [['Demo Tool', 'Tool example', 'demo_tool', '0'],['Analog ads1115', 'put analog values to SignalK', 'analog_ads1115', '0'],['Analog Firmata', 'put analog values to SignalK', 'oppymata', '0'], ['Moitessier HAT', 'configure Moitessier HAT settings', 'moitessier_hat', '0'], ['INA3221 Sensor', 'Adds INA3221 Sensor to I2C Bus', 'voltage_code', '1']]

5.       Reboot or start the tool in the Openplotter menu. The sensor should start automatically at each boot.
 

 Ill answer any questions I can and please let me know if it works for you.

Thanks & Good luck.


Attached Files
.txt   voltage_code.txt (Size: 1.93 KB / Downloads: 284)
.txt   SDL_Pi_INA3221.txt (Size: 5.97 KB / Downloads: 238)
Reply


Messages In This Thread
[solved] Battery monitor - by Luckbert - 2017-09-01, 07:38 PM
RE: Battery monitor - by PaddyB - 2017-09-02, 10:30 AM
RE: Battery monitor - by Luckbert - 2017-09-02, 12:42 PM
RE: Battery monitor - by PaddyB - 2017-09-02, 12:56 PM
RE: Battery monitor - by tocan - 2017-09-02, 01:54 PM
RE: Battery monitor - by e-sailing - 2017-09-02, 02:33 PM
RE: Battery monitor - by Luckbert - 2017-09-03, 01:58 PM
RE: Battery monitor - by Luckbert - 2017-09-23, 04:16 PM
RE: Battery monitor - by tocan - 2017-09-23, 05:51 PM
RE: Battery monitor - by Luckbert - 2017-09-26, 09:30 AM
Battery monitor - by Alpenskipper - 2017-09-28, 02:26 PM
RE: Battery monitor - by Opie91 - 2018-02-27, 02:54 AM
RE: Battery monitor - by Lazzz - 2018-02-27, 08:17 AM
RE: Battery monitor - by Luckbert - 2018-02-27, 10:21 AM
RE: Battery monitor - by Opie91 - 2018-02-27, 11:48 PM
RE: Battery monitor - by Opie91 - 2018-03-01, 04:18 AM
RE: Battery monitor - by Opie91 - 2018-03-04, 01:01 AM
RE: Battery monitor - by Lazzz - 2018-06-09, 09:37 AM
RE: Battery monitor - by Opie91 - 2018-06-09, 02:45 PM
RE: Battery monitor - by Lazzz - 2018-06-09, 10:24 PM
RE: Battery monitor - by Lazzz - 2018-03-04, 04:59 AM
RE: Battery monitor - by Luckbert - 2018-03-04, 02:51 PM
RE: [solved] Battery monitor - by Luckbert - 2018-06-09, 09:47 AM
RE: [solved] Battery monitor - by Opie91 - 2018-06-10, 02:34 AM
RE: [solved] Battery monitor - by Lazzz - 2018-06-10, 05:12 AM
RE: [solved] Battery monitor - by Alethediver - 2018-07-28, 08:21 AM
RE: [solved] Battery monitor - by Opie91 - 2018-07-29, 01:55 PM
RE: [solved] Battery monitor - by tjmack - 2020-05-27, 02:36 PM
RE: [solved] Battery monitor - by SARASTRO - 2021-02-24, 08:09 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)