|
Post by Richard b on Jan 27, 2018 10:55:18 GMT -8
Hey all, I am looking to use a sunair plus to power a raspberry pi system used for ADS-B scanning. I've got the wiring diagram from the main docs, but I can't find the sample code or how to for running a sunair plus from the Pi. Can anybody refer me to a good starting place?
|
|
|
Post by Richard b on Jan 27, 2018 10:56:35 GMT -8
Ugh, I mean sunair plus, not Subaru. Damn phone keyboards.
|
|
|
Post by SDL on Jan 27, 2018 12:45:31 GMT -8
|
|
|
Post by richard b on Jan 27, 2018 19:24:59 GMT -8
Hokay, so I grabbed the code, installed python and smbus, but when I run the test code, I get:
Traceback (most recent call last): File "testSDL_Pi_INA3221.py", line 30, in <module> ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40) File "/home/pi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 76, in __init__ self._bus = smbus.SMBus(twi) File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/smbus.py", line 56, in __init__ self.open(bus) File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/smbus.py", line 83, in open raise IOError(e.errno) IOError: 2
Any ideas?
|
|
|
Post by richard b on Jan 27, 2018 19:38:34 GMT -8
Okay, figured it out. I enabled I2c in raspi-config, and ran the test progams with an sudo. Now shows the battery voltage, etc.
|
|
|
Post by SDL on Jan 29, 2018 17:09:17 GMT -8
Excellent Richard!
BP
|
|