According to the Dexter GrovePi docs on GitHub, I can execute the line below in the Linux Terminal to add support for GrovePi to a Pi4 running a non-RaspianForRobots Linux distro:
Hereās the terminal text I got when I tried to execute the upgrade:
ubuntu@ubuntu:~$ curl -kL dexterindustries.com/update_gopigo | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 250 100 250 0 0 1059 0 --:--:-- --:--:-- --:--:-- 1059
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 11096 100 11096 0 0 11357 0 --:--:-- --:--:-- --:--:-- 48243
id: āpiā: no such user
main: line 24: [: 1000: unary operator expected
Welcome to GoPiGo Installer.
Updating GoPiGo for master branch with the following options:
--no-dependencies=false
--no-update-aptget=false
--bypass-rfrtools=false
--bypass-python-rfrtools=false
--bypass-gui-installation=false
--user-local=false
--env-local=false
--system-wide=true
Using "master" branch
Options used for RFR_Tools script: "--system-wide master --use-python3-exe-too --update-aptget --install-deb-deps --install-python-package --install-gui"
main: line 162: /home/pi/.tmp_rfrtools.sh: No such file or directory
Installing RFR_Tools. This might take a while..
bash: /home/pi/.tmp_rfrtools.sh: No such file or directory
rm: cannot remove '/home/pi/.tmp_rfrtools.sh': No such file or directory
RFR_Tools failed installing with exit code 127. Exiting.
ubuntu@ubuntu:~$
I too am having problems seeing the grovepi on my raspberrypi4 running ubuntu 20.04.
The i2c_bcm2708 kernel module is loaded, an i2c device exists at /dev/i2c-1 and i2cdetect correctly lists my i2c bus which is 1.
The command āsudo i2cdetect 1ā shows no devices connected, I was expecting to see the grovepi at address 0x04.
Note that the scripts in the GrovePi repo donāt work with the same errors as above i.e there is no ā/home/piā directory, āpiā user etc. as this is not raspbian. I could hack these maybe to overcome this but Iām not sure this will help at the mo.
Note using raspbian or any variant of it is not an option for me.
Longer answer:
Though you may be hosed, you might be able to work around it.
As far as I know, (based on my reading the posts made by those more skilled than I), these libraries weāre specifically designed for a Raspbian / Raspbian for Robots environment and there are important dependencies for Raspbian there.
I have also seen posts that talk about using C# and/or C++ libraries with the 'bots, that they exist, but I donāt remember where. Ā You can try snooping the Dexter GitHub repo or searching these fora for posts about alternative libraries.
I understand that there may be real reasons why Raspbian and/or Raspbian for Robots is not desirable. Ā You may, if possible, want to try a first iteration or two using Raspbian, just to verify that things work the way you expect - and then branch out into uncharted territory.
Go ahead and try, see what you can find, and let us know what happens!
P.S.
I am going to mention @Cleoqc and @cyclicalobsessive, they being my go-to wizards. Ā They might remember something Iāve forgotten.
Thanks for the reply, Iāll do as you suggest in that case, Iāll have a good look round the repo to see what I can find, also it wonāt kill me to just put a raspbian image on an sd card and boot from that just to check the board out. Iāve no reason to believe its not working but it might give me some more pointers.
You need to make sure your grovepi runs firmware 1.4, and it can only be updated via Raspbian. Once itās updated, you can use Ubuntu. This may be the cause of the device not showing up on the i2cbus. Please, make sure you do see it on Raspbian first. Then we can eliminate that potential issue.
The file you definitely need from the repo is this one:
but go ahead and clone the repo because there may be some drivers also, depending on which sensors/actuators you use in your project. Running setup.py shouldnāt be raspbian dependant although Iām not 100% certain.
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
ā¦ and more ā¦
OK, think were OK now, I added the line
dtparam=i2c_vc=on
to the boot/config.txt on Raspbian, this gave me i2c bus 0, so I now have 12c 0 and 1.
Scanning the buses now shows that the grovepi is on bus 1 as device 0x04, not bus 0 as I expected, but at least it was present. I plugged in some of my i2c grove devices, these were seen correctly again on bus 1.
Updated the firmware as per the instruction in the README, this seemed to work, verified it with the complete_test script in trobleshooting.
Over to Ubuntu, only one i2c bus, bus 1 but the grovepi and my devices were present as on raspbian.
OK, I access my devices through mraaās i2c api, I need to look at this next.
On any later version of the Pi, (where ālater versionā means a version with a 40-pin GPIO), i2c buss zero is now dedicated to the HAT IDENT function and is no longer on pins 2 and 3 as before.
On the old, 26 pin devices, pins 2 and 3 were i2c buss 0, because that was all there was - there was no i2c buss 1 then as the hardware didnāt support it.
When the Raspberry Pi Foundation updated things to the 40-pin GPIO, i2c buss 0 was moved to (physical) pins 27 and 28 to handle the IDENT feature of the new HAT specification, and the newly added i2c buss 1 was wired to pins 2 and 3, replacing the i2c connection that used to be there.
So, anything that uses the older 26 pin standard for the GPIO, (and the older versions of Raspbian that ran on them), will have to have the i2c buss ID changed from zero to one when used on newer versions of the Pi and/or newer versions of Raspbian.
Advanced users , can, if they choose to, use their own image. If you already have your own flavor of linux running on the Raspberry Pi, you can use our bash script to setup for the GrovePi. Configuring your own image following the steps below:
In the command line type: sudo curl -kL dexterindustries.com/update_grovepi | bash. Restart the Raspberry Pi. sudo reboot. Your SD card now has what it needs to start using the GrovePi!
Iām thinking maybe the post-acquisition DexterIndustries isnāt too concerned with the GrovePi+?
I have not tried it yet but I know for sure you need a user named pi for the scripts to work (you can remove the user afterwards).
Do you have a pi user?