Uncategorized

Gpio.Zero L298N problem

Asked 
Active today
Viewed 24 times
0

this is in mu

from gpiozero import Robot

robby = Robot(left=(7,8), right=(9,10))

this is in the Raspberry Pi terminal

python robby.forward()
# Then it says ‘robby’ is to defined, I don’t know why it says that. I defined ‘robby’ in the mu command. The motors and motor board are clearly working, just not the code.

 New contributor
0

Answer

(1) The “Buid a buggy” instructions is not clear.

I got the same error as the OP.

What the OP can do is the “Yellow Block” below.

robby.py


(2) I looked at the instructions again and found that perhaps they are for Rpi3B+ IDLE python 3.5.3. I vaguely remember that for IDLE 3.5.3, the IDE is divided into two separate windows, left window is text terminal output, right window is for IDLE editing/compile/run.

What confuses the OP further is that the Mu editor saves python script files by default in the directory home/MuCode/, but IDLE would save files in another default directory.

idle python

/ to continue, …


References

(1) Build a robot buggy, Basic Instructions – Projects.RaspberryPi.Org

(2) Build a robot buggy, Assemble and Make a Lipo Power Bank

(3) Robby to go in a square, a circle, and zigzag

(4) GpioZero 1.5.1 Section 16.1.15. Robot classgpiozero.Robot()


.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: