Figured out one way to use the joystick


#1

There has to be a better way.


#2

Joystick controlled mbot (funny but impractical tethered control).


#3

This worked, but I’m sad there isn’t a “cleaner” way to do this that I can explain to my kid easily :smiley:

Correction, the bot constantly turns right - it still is controllable, but either the joystick is sending erroneous entries or I’ve messed up the program, heh.


#4

Here’s my simple program you can use that makes the mbot wired joystick control the mbot (with colors by my boy).


#5

I worked out how to use the joystick on mBot Ranger. Feel free to adjust for mBot, but the principle is the same. You need to use consecutive embedded if-then statements with the last one setting the motors to ‘0’