any chance this is working with one of these alternative boards?
Banana Pi M2 Berry
Banana Pi M5
Radxa Rock 3 A
Radxa Rock 4 C+
my first test with M2 Berry and the 16.04 official image was that the GrovePi is visible via $ sudo i2cdetect -y 2
the grove_rgb_lcd example works with the smbus number changed from 1 to 2.
but i did not get the grovepi.py to work. also i tried with setting it to hw smbus mode and tweaking the di_i2c.py script to use also use the bus ‘2’:
with this i get an exception at line 225
as after the first read the data variable just has a simple 0 in there. (not a list…)
anyone had this running?
i have cross-posted this request at the GrovePi github repro:
There is research being done by Modular Robotics/Dexter Industries on this exact topic, but it is quite early on in the process and there really isn’t much to report as yet.
If you do any research on this topic yourself, we’d all greatly appreciate if you’d post about it here and perhaps on the GoPiGo GitHub site.
just a clarification from my side-
i am mainly interested in python and maybe node-red support…
i have some first findings:
banana pi M2 Berry
grovepi not working yet. (needs a bunch of more in depth looking at the sources…) rgb_lcd is working with modifications.
just setting bus = smbus.SMBus(2) (commenting all the other lines 25…35.
Banana Pi M5
working.
after an odyssey of digging into what this all depends on i came up with something that seems to work:
this is currently only what i have done → to be checked what is really needed…
sudo pip uninstall RPI.GPIO
git clone https://github.com/BPI-SINOVOIP/RPi.GPIO.git
cd RPi.GPIO/
sudo python setup.py install
# cd ~
# sudo apt remove wiringpi
# # this installs the forked version from https://github.com/WiringPi/WiringPi-Python
# pip install wiringpi
# not needed anymore..
# as we use hw i2c
# tweak grovepi.py
# change
# set_bus("RPI_1SW")
# to
# set_bus("RPI_1")
# → to enable HW mode.
# tweak di_i2c.py
# change
# self.i2c_bus = I2C("/dev/i2c-1")
# to
# self.i2c_bus = I2C("/dev/i2c-0")
# check
python ./Dexter/GrovePi/Software/Python/grove_led_blink.py
# working
nano ./Dexter/GrovePi/Software/Python/grove_rgb_lcd/grove_rgb_lcd.py
# remove lines
# import RPi.GPIO as GPIO
# rev = GPIO.RPI_REVISION
# if rev == 2 or rev == 3:
# bus = smbus.SMBus(1)
# else:
# so that only this line is there
# bus = smbus.SMBus(0)
# check
python ./Dexter/GrovePi/Software/Python/grove_rgb_lcd/grove_rgb_lcd.py
# working
@jimrh do you have a link / issue i should report to?
i have no repro for this project explicit - as it is just a test setup.
i am willing to create pull-requests for the GrovePi and RFR_Tools repros -
as these are the points where the board detection in python is failing…
this would need some help from others to cross test on orig RPIs as i do not have access to such…
The best way would be to create a repo for your project and then fork the repositories where you are having problems. You can use the forked repo’s in your project, and as you generate solutions you can generate pull requests from your fork.
Having a project specific repo is good because it allows you to both segregate and share your work with others who may wish to either learn from you, or help add to your efforts.