GrovePI firmware update issue

Hi there,

I can’t use buttons nor encoders on my GroovePI, I suspect it comes from the firmware.
My GroovePI firmware version is 1.2.2, and I want to upgrade to 1.4.0

When I run the script sudo bash firmware_update.sh from /home/pi/Dexter/GrovePi/Firmware, I get the an error saying:
gpio/direction: No such file or directory

Full script output below:

pi@raspberrypi:~/Dexter/GrovePi/Firmware $ sudo bash firmware_update.sh
Updating the GrovePi firmware
=============================
 http://www.dexterindustries.com/grovepi 
 Run this program: 
 sudo ./firmware_update.sh
 
=============================
Do you want to update the firmware? [y,n]y
Make sure that GrovePi is connected to Raspberry Pi
Firmware found
Press any key to start firmware update
. . .
gpio/direction: No such file or directory

avrdude done.  Thank you.

gpio/direction: No such file or directory

avrdude done.  Thank you.

gpio/direction: No such file or directory

avrdude done.  Thank you.

gpio/direction: No such file or directory

avrdude done.  Thank you.

pi@raspberrypi:~/Dexter/GrovePi/Firmware $

I started from a fresh install using the recommanded RaspOS version, eg 2023-05-03-raspios-buster-armhf
I enabled SPI and I2C with raspi-config.

Any clue?

2 Likes

@jimrh is the only person to guide you on this topic. Perhaps a forum search with avrdude will find his posts.

1 Like

I will need to know which raspberry pi version are you using, what operating system, and which version of the GrovePi you are using.

  • What version of the Raspberry Pi are you using?

    • Pi-2 or earlier?
    • Pi-3?
    • Pi-4?
    • Something else?
       
  • Which operating system have you downloaded to your SD card?

    • Raspbian for Robots?
    • GoPiGo O/S?
    • Something direct from the Raspberry Pi site?
       
  • Which version of the GrovePi board are you using?

    • An “Original” GrovePi board?
    • A GrovePi+?

This can make a really big difference in what works and what doesn’t.

========================================

Update:

I need to learn to wear my glasses when I’m reading these forums! :man_facepalming:

In order to flash the grove firmware you will need:

  1. The latest Raspbian for Robots software flashed to an 8gig minimum sized SD card.
    https://www.dexterindustries.com/download/r4r_stretch

  2. A Raspberry Pi-3 or earlier.&nbsp: (A Pi-3/3+ is recommended though a Pi-2 will also work.)
    Note that you cannot use a Pi-4 to update firmware! [1] [2]

  3. The Grove board attached to the Raspberry Pi device.

You will then go into the control panel applet on the desktop and select “update firmware”.  (P.S.  I am doing this from memory, I haven’t flashed firmware on ANYTHING in years!)

If you run into trouble, let me know.

==================== Footnotes =====================

  1. The really-and-truly authorized software for the GrovePi/GrovePi+ is Raspbian for Robots.  You can try working with other self-installed versions, but they may or may not work depending on the positions of individual planets, stars, constellations, etc.  In other words:  Your Mileage May Vary.

  2. If you want to try using Raspbian for Robots (and a GrovePi/GrovePi+), with a Pi-4, there is an “experimental” version of Raspbian for Robots based on Buster that should work on the Pi-4.
    https://www.dexterindustries.com/download/r4r_buster
    Note that you still should not attempt to re-flash the firmware using a Pi-4 because it can “brick” your GrovePi board.  Even if it seems to allow it, DON’T!
     
    (There’s some interesting history about these releases if you or anyone else is interested.)

1 Like

Thanks, I’ll try with this distribution and I’ll keep you posted.
For reference, I tried with a Rasp 1 model B and a Rasp 3 model B, with a Groove Pi+, and with the distribution I mentioned in my first post.

2 Likes

I am assuming it’s a “home-brew” (curl’d) install and sometimes they have problems.  If your firmware is really as old as you say, once you get it updated it might work with the version you originally tried.

It will be interesting to see what happens when you get the correct version of the firmware installed.

2 Likes

Hi @jimrh
I’ve been able to update the firmware, thank you SO much!!
From the Raspbian for Robots distrib, I was able to upgrade from version 1.2.2 to 1.3.0
Then I upgraded to the latest 1.4.0 firmware.

I made some quick tests. The grove button which did not work with 1.2.2 works great, but not the encoder. The script starts, but it does not detect any change (I checked the port).

If anyone has any idea?

2 Likes

Tell me what you did.

I don’t remember the Grove board having a motor interface.  How did you hook it up?

1 Like

The encoder is this one: Grove-Encoder | Seeed Studio Wiki

And this is the code I’m trying to run: GrovePi/Software/Python/grove_encoder_read.py at master · DexterInd/GrovePi · GitHub

1 Like

(post deleted by author)

What port do you have it connected to?

What is the result of:

i2cdetect -y 1

I think the encoder should appear as 0x36 (but Google AI could be wrong…)

@cyclicalobsessive the encoder is connected to port D2.

Output is:

$> i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- 3e -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --               

(2 other devices are connected to i2c-1 and i2c-2)

1 Like

Personally, I know nothing about the GrovePi+, or the encoder.

What I do see is that something is listed as 0x04 AND there is a forum note about post epidemic some Grove products being shipped needing address 0x08 and suggesting the need to change the address.

You might make a local copy of grovepi.py to the same folder as your test script, change the address in line 60 to 0x08, and see if the sensor is now visible to the GrovePi.

grovepi.py is in the same repo folder you linked and possibly on your RaspberryPi under /home/pi/Dexter/GrovePi/Software/Python/ - Like I said, I don’t know anything about the GrovePi.
To get it from the repo to your local test folder:

wget https://raw.githubusercontent.com/DexterInd/GrovePi/refs/heads/master/Software/Python/grovepi.py 

With the changed local copy in the same folder you execute from, will import from the local copy of grovepi.py rather than the copy in the python site packages.

REF: this forum post about changing the i2c address with a different product