Gopigo is not running code

gopigo

#1

Hello I have tried simple commands for Raspbian for robots in python Shell on the desktop and they don’t work such as forward() etc. When I try on my other SD card with Dexter OS simple commands do work but im trying to make my robot follow a line using the line follower sensor but my code is not working. Please help I been fighting with this the past couple days


#2

Hi @labro24,

It could be very well that you’re using a different API for a different robot. We need to separate the 2 libraries:

  1. For the GoPiGo3 robot, you have the EasyGoPiGo3 library which can be imported with import easygopigo3.

  2. For the GoPiGo robot, which is our retired robot that we no longer sell, you can import it with import gopigo (or import easygopigo).

The incentive to believe that is that on DexterOS it works - that’s because DexterOS has a mechanism to detect which robot is connected to it.

Anyhow, can you tell us what robot are you using? Is it the GoPiGo or the GoPiGo3 - if you’re not sure, you can take a photo of it. And what does your script look like?

Thank you!


#3

im using the gopigo3 and I imported the libraries


#4

Hi @labro24,

If you’re importing the easygopigo3 library and you’re using the GoPiGo3, then it can mean you don’t have the batteries plugged in.

Even if you’re powering the setup through the micro USB cable, this doesn’t mean you’ll be able to move the robot in any way. You are still going to need to hook up the batteries.

The robot can move only when the power LED of the GoPiGo3 is colored in green.

Thank you!