How To Command The Gopigo Robot Remotely From A Desktop Keyboard - Purpose 5

- July 27, 2018
Part four was near testing out a unproblematic Python script to deed forwards, backwards as well as and then destination the GoPiGo Robot car. On today's Part 5, I volition expand on the before code to command the robot automobile via a desktop keyboard using the "Python Tkinter Keypress Event". For this, nosotros utilize some other file ( inwards the same directory (Desktop/GoPiGoLocal) equally

Then, write the next lines of code:

To execute the code to a higher house to tun the Tkinter event, nosotros piece of job the Windows "Remote Desktop Connection" interface. Once you lot larn the prompt below, come inwards your Raspberry Pi's IP address as well as click connect:
Click on the LX Terminal as well as enter: cd Desktop/GoPiGoLocal/ >ls > sudo python The TKinter final result window volition popular upwards (you tin run across it below equally tk)
Now you lot tin press the predefined keys on the keyboard as well as remotely command the robot automobile from your desktop keyboard.
To command the servo, nosotros add together the next lines of code to The servo rotation ranges from ii to 9, thence when pressing the numbers 2,3,4,5,6,7,8,9 the servo volition rotate from left, correct as well as center.
After entering the lines of code above, you'll survive able to command the servo as well as rotate it roughly a skilful 180 degrees.
find as well as seek
Stay tuned for Part 6 where I'll survive testing out the GoPiGo's might to disclose obstacles as well as travail roughly them. 

Start typing and press Enter to search