GrovePi Firmware Update v1.2.2

An updated firmware and software for the GrovePi has been released.

You can download the latest firmware and software from out Github Repo https://github.com/DexterInd/GrovePi/.

Refer to the firmware update guide for instructions on updating the firmware:

http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/

Also update the GrovePi Library by running python setup.py install in the Software/Python folder.

Major Changes:
*Grove LED Bar added
*Firmware version made available
*Grove 4 Digit Display added
*Grove Chainable RGB LED added
*Ability to persist a RGB color in memory for later use

If you want more features or face any problems, please post it on the forums and we’ll help you out.

What firmware version does the GrovePi+ ship with?

Hello,

I am looking at this page for the firmware update: http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/

My board doesn’t look like this at all. The ports on my board are not white, but sort of yellowish like an old Apple II computer. Also, I don’t have the same layout. I see the ISP ports but not the others. I must have the Grove+

So when the software prompts to “Connect the jumper to the Reset pin and Press any key to start firmware update” I chose to press any key and it continued.

Here’s what came up:
pi@raspberrypi ~/Desktop/GrovePi/Firmware $ sudo ./firmware_update.sh
Updating the GrovePi firmware

Do you want to update the firmware? [y,n]y
Make sure that GrovePi is connected to Raspberry Pi
Firmware found
Connect the jumper to the Reset pin and Press any key to start firmware update
. . .
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "grove_pi_firmware.hex"
avrdude: input file grove_pi_firmware.hex auto detected as Intel Hex
avrdude: writing flash (14480 bytes):

Writing | ################################################## | 100% 8.20s

avrdude: 14480 bytes of flash written
avrdude: verifying flash memory against grove_pi_firmware.hex:
avrdude: load data flash data from input file grove_pi_firmware.hex:
avrdude: input file grove_pi_firmware.hex auto detected as Intel Hex
avrdude: input file grove_pi_firmware.hex contains 14480 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 7.53s

avrdude: verifying …
avrdude: 14480 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

Hey,
Does the firmware update work for you or are there any problems that you face after the firmware update.

-Karan

Is it OK to grade directly to v1.2.3 or should I upgrade to an older version first? Any help is appreciated!

Hey,
It is allright to upgrade to v1.2.3 directly and you can skip the older versions.

-Karan

Can you tell me how I check what version of firmware is loaded?

Does this signify the type of board?
avrdude: Device signature = 0x1e950f

I have not been able to find anything that helps me determine the firmware loaded.

Hey,
You can run: https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_firmware_version_check.py to check which firmware version is loaded on the GrovePi. If it returns something like 255.255.255, then you are probably running a very old firmware. Try running the script a couple of times.

-Karan

Hi Karan,

I followed all your instructions and there wasn’t error but at the end I’m still in v.1.2.2 instead of 1.2.3.

Below all I did:

sudo python ~/Desktop/GrovePi/Software/Python/grove_firmware_version_check.py
(‘GrovePi has firmware version:’, ‘1.2.2’) <-- At the beginning

sudo /home/pi/Desktop/GrovePi/Firmware/new_fw_search.sh

Welcome to GrovePi Firmware Update Check.

Please ensure internet connectivity before running this script.
Must be running as Root user
Press any key to begin…

Check for internet connectivity…

Connected
You have the latest firmware

sudo /home/pi/Desktop/GrovePi/Firmware/firmware_update.sh

Updating the GrovePi firmware

Do you want to update the firmware? [y,n]y
Make sure that GrovePi is connected to Raspberry Pi
Firmware found
Connect the jumper to the Reset pin and Press any key to start firmware update
. . .

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "grove_pi_firmware.hex"
avrdude: input file grove_pi_firmware.hex auto detected as Intel Hex
avrdude: writing flash (14480 bytes):

Writing | ################################################## | 100% 13.29s

avrdude: 14480 bytes of flash written
avrdude: verifying flash memory against grove_pi_firmware.hex:
avrdude: load data flash data from input file grove_pi_firmware.hex:
avrdude: input file grove_pi_firmware.hex auto detected as Intel Hex
avrdude: input file grove_pi_firmware.hex contains 14480 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 12.64s

avrdude: verifying …
avrdude: 14480 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

sudo python ~/Desktop/GrovePi/Software/Python/grove_firmware_version_check.py
(‘GrovePi has firmware version:’, ‘1.2.2’) <-- At the end

Toni

Hey,
The v1.2.3 is not available by default and v1.2.2 is the default firmware. Can you burn the code from this folder: https://github.com/DexterInd/GrovePi/tree/master/Firmware/Source/v1.2/grove_pi_v1_2_3 using avrdude -c gpio -p m328p -U flash:w:grove_pi_v1_2_3.cpp.hex to try v1.2.3.

-Karan

Hi Karan

Thank you for your reply. Is it safe to perform the upgrade or should I wait?

Anyway, as it’s the first time that I’m going to perform and firmware upgrade in a GrovePi, let me check the steps:

  1. Go to /home/pi/Desktop/GrovePi/Firmware/Source/v1.2/grove_pi_v1_2_3

  2. sudo avrdude -c gpio -p m328p -U flash:w:grove_pi_v1_2_3.cpp.hex

  3. reboot

  4. sudo python ~/Desktop/GrovePi/Software/Python/grove_firmware_version_check.py

After all of this I should have v1.2.3 right?

Toni

Hey Toni,
It is safe to upgrade to 1.2.3 and in case of a problem, you can easily switch back to 1.2.2 easily following the same method.

The steps look right and you don’t need to do a reboot after the upgrade.

Do let us know how it goes for you.

-Karan

Ok Karan.

Do I have to do a python setup.py install after upgrading?

Toni

The old library would work too, but it would be better to do a python setup.py install just to make sure that you are using the latest software too.

-Karan

Thanks again Karan,

I upgraded the firmware and ran python setup.py install. So far all is running and the firmware is showed as v.1.2.3.

There’re two weird things I noticed (I have my GrovePi+ Starter Kit sonce a couple of days ago) using the hardware:

a) When I power on the RP (specially after a long rest) the red led is on and if the board is not properly detected when I run sudo i2cdetect -y 1 (I mean: not 04 at all). But if I unplug and plug again the red led is not on and all run as it’s expected. I noticed this issue several times specially the first time after being some hours turned off.

b) Regarding the use of sensors I’ve been playing around with the Grove Ultrasonic ranger sensor placing it quietly in a clean surface (not other objects around) and pointing up to the ceiling to test (more o less) its precision. The weird thing is that sometimes running sudo python grove_ultrasonic.py shows a value completely different from usual. I mean, if the usual value are form 235-239 (two wide interval assuming that it was placed quietly pointing to the ceiling) sometimes I get 65535, 668, and not too often but it happens a ‘error’ message. These weirds values can trigger a wrong action in a python script if, for ex, go over or under a threshold value. Is this an expected behavior of the Grove Ultrasonic ranger or there’s something wrong?

Thanks in advance for all Karan,

Toni

Hey Toni,
Great to hear that you have 1.2.3 up and working now. We haven’t seen the issue before with the Red LED being turned on while boot. The Red LED is connected to the Reset line on the Atmega MCU on the GrovePi. It is used when we are flashing the MCU with a new firmware. It is connected to the CE0 pin on the Raspberry Pi. Looks like for some reason, the CE0 line is staying high after the boot. It might be because of SPI being enabled or the GPIO being used for some other reason. When the reset line is High and the Red led is on, the GrovePi won’t respond because it’s in a reset state. Can you try using the Dexter Industries image just to see if you still face the problem.

I’ll test the ultrasonic sensor with one of our boards and get back to you about this.

-Karan

I’m also having problems updating the firmware on the GrovePi+

Using the Python checker above I get:


$ python grove_firmware_version_check.py 
(&#039;GrovePi has firmware version:&#039;, &#039;255.255.255&#039;)

Trying to update it, I get:
avrdude: Can't find programmer id "gpio"

I’m using avrdude from apt-get, is there a special version for this?

$ dpkg -l avrdude
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  avrdude        5.11.1-1     armhf        software for programming Atmel AV

The reason I’m keen to update the firmware is that less than half the Python examples seem to work:
rgb_lcd - works
4 digit led - doesn’t work
touch sensor - works
dht11 - doesn’t work
light sensor - doesn’t work
relay - works
ntc temperature sensor - doesn’t work.

I’ve read the code and double checked I’m plugged into the correct port.

Pete

Anyone?

Hey,
Are you using the Dexter Industries image with the GrovePi+. We are using a custom version of the programmer to use the Pi to upload firmwares. Looks like you are not using that.

-Karan

I’m using the software from here: https://github.com/DexterInd/GrovePi/tree/master/Software but there’s no avrdude in that repo. Is there a special Raspbian image for GrovePi+?

Pete