[SOLVED] GoPiGo3 erratically driving and not following commands

Hey team!

Yesterday when I ran the test program (EasyMotors.js), it worked fine and did exactly as instructed, but today it suddenly is no longer obeying/executing orders.

It starts off but it never pauses on sleep(1), nor does it stop when gpg.stop(); is executed and continues running forever, until I kill the program and exit.

Also, when I give it gpg.forward() command, only one wheel spins.

Any ideas?

Hello @sasa.savic

You are using NodeJS, if I remember, could you please confirm?

Also could you share photos of the motor that doesn’t spin? Mostly photos of the disk at one end of the motor.

For now, I can’t tell you whether it’s hardware or software, until I get those photos.


Yep, using NodeJS.

When I send the gpg.forward() command, initially, both wheels start to spin. In one of my codes I have this:

                delay = parseInt(command[command.type].delay);
                if (delay > 0) setTimeout(this.stopVehicle, delay);

Basically, I run a timeout when I’d like for GoPiGo to stop, once forward executes. What I noticed is that when stopVehicle() runs (which only has gpg.stop()), only the left wheels tops, and not the right wheel - the right wheel also runs a lot faster than the left one.

What this is telling me is, when gpg.stop(); runs, (or even if sleep(1) runs), it ignores those commands (at least, the right wheel seems to ignore those commands).

IMG_20190612_090905 IMG_20190612_090858 IMG_20190612_090852 IMG_20190612_090830 IMG_20190612_090845

Thanks for the photos. It’s quite obvious (to me) what’s happening. One of the motors has one sensor that is completely bent backwards. It’s those little black thingies that are quite near the spinning disk. Those sensors should be within one or two millimeters of the spinning disk.
Can you bend it back into position? That will be the quickest fix.

If it cannot be bent back, then we will replace the motor.


1 Like

Genius! :slight_smile: Fixed it … I wasn’t aware of the sensors on the actual motors - what are the sensors used for?

Great! Thanks for letting us know it’s now back to normal!
Those sensors are what detects how far the motor has driven. It allows for methods like driveCm() which most other Pi-based robots on the market cannot handle.

This topic was automatically closed after 46 hours. New replies are no longer allowed.