Can't pass basic_test_all.py


#1

Hi there,

I downloaded and installed the modified Raspbian image. After that, I update using sudo apt-get update and sudo apt-get upgrade and then pulled from the latest GoPiGo repository. When I boot the RPi, the right wheel moved a little bit. When I run sudo python basic_test_all.py and type in w or any other movement commands, it simply doesn’t move. Besides, when I type in v for voltage, it says -1 V. I don’t have any experiences with hardware like GoPiGo. Has anyone seen this before or could give me some hint?

Any help will be appreciated!

Eric


#2

Hi Eric,
I think you have not enough power in the battery’s.
Your battery’s have to have 12V
Are your sure you use new battery’s ?

Greetings
input


#3

Hi input,
Thanks for the reply! I just replaced with a new pack of 8 AA batteries. Now, it still won’t respond to movement commands in basic_test_all.py. But it says 0.0 V when I type in v for the voltage.

Eric


#4

What does sudo i2cdetect -y 1 show when you run it on the terminal.

-Karan


#5

Hi Karan,
Thanks for the reply! The connection between Raspberry Pi’s pins and GoPiGo board’s socket is a little bit loose.

If the connection is loose, only the green light on Raspberry Pi board is on, but I can still ssh onto Raspberry Pi. The voltage is 0.0 V and the output of sudo i2cdetect -y 1 is:

pi@raspberrypi ~/Desktop/GoPiGo/Software/Python $ sudo i2cdetect -y 1 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 
70: 70 71 72 73 74 75 76 77

After I fix the loose connection, both green light and red light on Raspberry Pi board are on. Then the voltage is -1 V and the output of sudo i2cdetect -y 1 is:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

Thanks!
Eric


#6

Hey,
You should get a 08 like this:

pi@raspberrypi ~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- 08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Can you attach a picture zoomed in on the connector of how the Raspberry Pi is connected to the GoPiGo. There might be a change that the GoPiGo is not connected properly.

Can you also run: avrdude -c gpio -p m328p and post what it shows. This would show if the Raspberry Pi is able to detect the chip on the GoPiGo.

-Karan


#7

Hi Karan,
Please see the attachment for connector picture. The output of avrdude -c gpio -p m328p is

pi@raspberrypi ~ $ avrdude -c gpio -p m328p

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Besides the command line output, the car’s right wheel moved a little bit as I run avrdude -c gpio -p m328p.
I kind of feel that the left motor is not properly connected, but I do not know how to verify that. What do you think?

Thank you!


Edit: When I tried twice, it outputs:

pi@raspberrypi ~ $ sudo avrdude -c gpio -p m328p

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

#8

Looks like there might be a problem with the fuse or the firmware on the GoPiGo.

Make sure you disconnect the wires going to the motors from the GoPiGo board before starting.

First burn the fuses, double check the commands before you run them: avrdude -c gpio -p m328p -U lfuse:w:0x7F:m , avrdude -c gpio -p m328p -U hfuse:w:0xDA:m and avrdude -c gpio -p m328p -U efuse:w:0xFD:m.

After this, go to the firmware folder in the GoPiGo folder on Desktop (it should have a similar file structure): https://github.com/DexterInd/GoPiGo/tree/master/Firmware , make the update script executable: sudo chmod +x firmware_update.sh and then run it sudo ./firmware_update.sh.

Try running the i2cdetect detect command and the basic script and let us know if that works.

-Karan


#9

Hi Karan,
Thanks for the reply! I can successfully run avrdude -c gpio -p m328p -U lfuse:w:0x7F:m and avrdude -c gpio -p m328p -U hfuse:w:0xDA:m, but avrdude -c gpio -p m328p -U efuse:w:0xFD:m. The output of the last command is:

pi@raspberrypi ~ $ avrdude -c gpio -p m328p -U efuse:w:0xFD:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;  
Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFD:
avrdude: load data efuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip efuse data:

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

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xfd != 0x05
avrdude: verification error; content mismatch

avrdude: safemode: efuse changed! Was fd, and is now 5
Would you like this fuse to be changed back? [y/n]

I chose n and went through the firmware update script later. After that, the output of i2cdetect command is as below:

pi@raspberrypi ~ $ sudo i2cdetect -y 1 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

I also plugged back in the motor connection and run the basic script, it didn’t work neither. Besides, the voltage output now is -1 V.

Thanks!


#10

Hey,
Can you post the output that you get when you run the firmware update script.

-Karan


#11

HI,
I looked at your picture that you attached and it looks like you did not push the pins from the raspberry pi well into the connector from the GoPiGo.
Did you see the video from the assembly https://www.youtube.com/watch?v=9FLtFkNjwWg
Before you push on the raspberry pi you have to turn the power off on the GoPiGo board.
good luck


#12

Hi Karan,
Here is the output when I run the firmware update script:

pi@raspberrypi ~/Desktop/GoPiGo/Firmware $ sudo ./firmware_update.sh 
ATTENTION! Important!
BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS.
Please confirm that you've disconnected the motors.
Have you disconnected the motors before programming the firmware? (y/n)
y
Updating the GoPiGo firmware
=============================
Wed Sep  9 07:19:55 UTC 2015

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: reading input file "0x7F"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x7F:
avrdude: load data lfuse data from input file 0x7F:
avrdude: input file 0x7F contains 1 bytes
avrdude: reading on-chip lfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

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 "fw_ver_13.cpp.hex"
avrdude: input file fw_ver_13.cpp.hex auto detected as Intel Hex
avrdude: writing flash (10748 bytes):

Writing | ################################################## | 100% 5.76s

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

Reading | ################################################## | 100% 5.33s

avrdude: verifying ...
avrdude: 10748 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

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

Besides, @input, I followed the step-by-step tutorial here: http://www.dexterindustries.com/GoPiGo/1-assemble-the-gopigo/assemble-gopigo-raspberry-pi-robot/. Due to the layout of RPi 2 and GoPiGo, I cannot fully push the pins into the socket. I’m not sure if this is the reason. Do you mind shooting me a picture of how you setup the connection?

Thanks!
Eric


#13

Hey Eric,
Can you still not see anything when you run sudo i2cdetect -y 1. I have attached a picture of how my GoPiGo looks.

-Karan


#14

Hi Karan,
I still can’t see a 08 in the output of sudo i2cdetect -y 1 like you mentioned before. Besides, thanks for the picture. I noticed your pins are (almost) fully pushed into the socket. I am wondering if you are also using Pi 2. As you can see in the new picture I attached, it’s physically impossible for me to push the pins further down.
Thanks,
Eric


#15

Hey,
It really looks like you received a broken GoPiGo. Thanks a lot for testing it out. I’m really sorry for the frustration.

Can you contact us here, under “General Questions and Feedback”: http://www.dexterindustries.com/site/?page_id=65. We will have one shipped to you immediately.

Again, I’m really sorry to hear about this; we’ll make it right immediately.

-Karan


#16

Hi Karan,
I’ve posted the feedback as you suggested. Thanks for the help.

Eric


#17

Hello,

I am experiencing the same problem with the GoPiGo we just received.

I have gone through all of the processes defined here

here is my output …

pi@raspberrypi ~/Desktop/GoPiGo/Software/Python $ sudo python basic_test_all.py

Cmd: v
0.0 V

pi@raspberrypi ~/Desktop/GoPiGo/Software/Python $ sudo i2cdetect -y 1

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77


#18

Hey,
Can you send a picture of how you are connecting the GoPiGo and the Raspberry Pi. Also, how are you powering the whole thing and what output do you get when you run the firmware update script from here: https://github.com/DexterInd/GoPiGo/tree/master/Firmware . Make the script executable: sudo chmod +x firmware_update.sh and then run it sudo ./firmware_update.sh . Make sure the motors are disconnected before you run it.

-Karan


#19

Here is the output from the script

pi@raspberrypi ~ $ sudo ./firmware_update.sh
ATTENTION! Important!
BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS.
Please confirm that you’ve disconnected the motors.
Have you disconnected the motors before programming the firmware? (y/n)
y
Updating the GoPiGo firmware

Thu Sep 17 01:46:40 UTC 2015

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: reading input file "0x7F"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x7F:
avrdude: load data lfuse data from input file 0x7F:
avrdude: input file 0x7F contains 1 bytes
avrdude: reading on-chip lfuse data:

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

avrdude: verifying …
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

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 "fw_ver_13.cpp.hex"
avrdude: error opening fw_ver_13.cpp.hex: No such file or directory
avrdude: input file fw_ver_13.cpp.hex auto detected as invalid format
avrdude: can’t open input file fw_ver_13.cpp.hex: No such file or directory
avrdude: write to file ‘fw_ver_13.cpp.hex’ failed

avrdude: safemode: Fuses OK

avrdude done. Thank you.

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


#20

Hey,
It looks like the firmware file that you have on your local system might be corrupted. Can you delete your local repository and clone the github repository on Deskktop: git clone https://github.com/DexterInd/GoPiGo.git . Once this is done, go to the firmware folder and make the script executable and try running the firmware update script again from https://github.com/DexterInd/GoPiGo/tree/master/Firmware . Can you also check if there is the firmware file "fw_ver_13.cpp.hex"present in the folder before you start.

-Karan