Python IDLE with GoPiGo

I am trying to communicate between the Python shell and the gopigo. But how do I connect to gopigo from the Python IDLE? Please help. Also, I want to use putty to connect to gopigo. What are the steps?

1 Like
  1. What OS is running on the GoPiGo3?
  2. What OS is your Python IDLE running on?
  3. Why putty (hardwired serial connection)?
  4. What is your WiFi environment?
1 Like
  1. I am using the Dexter OS that came with the kit
  2. Windows 10
  3. I am trying ways to create a connection with as I found putty can do a SSH
  4. Connecting to GoPiGo robot’s SSID

This is what I did. I turned on the robot, connected my laptop PC to the SSID of the robot. It opens gopigo.com page, I tried the Python there but I found it is a line by line execution.
I found somebody using the Python IDLE to program it. But I am not finding a way to connect the Python IDLE to my gopigo robot. I am a beginner.

1 Like

I don’t run DexterOS, but lacking anyone else chiming in - these are my understanding:

  1. DexterOS does allow creating and running Python files. I believe you must have a USB flash drive installed as the save-to destination.

  2. To my knowledge, DexterOS is not intended to allow any command line access, not from the browser environment, and not through SSH. @Jimrh may have figured something out about this.

Dexter Industries has tailored the DexterOS capabilities to the beginner, and provided examples and sample programs. Before venturing off into DIY land, it is probably wise to investigate what DexterOS has to offer.

As an older, often set-in-my-ways, user I don’t use any integrated development tools, but am aware that the Raspberry Pi foundation is now teaching Python to beginners using Thonny on “Pi OS” which is Buster based, and that Dexter Industries has been working to get a Buster-based Raspbian For Robots OS into the hands of advanced users.

This is a whole bag of worms when it comes to OS and programming environment choices to work with the GoPiGo3. DexterOS is a stable environment for beginners.

The first step in this “Python in Jupiter Notebook for GoPiGo” video is to select the USB drive, and the last step shows a full program in a single cell so that it does not run line by line:

Oh and another question:
5) What Raspberry Pi board does your GoPiGo3 have? (Pi 3B, Pi3B+, Pi4)?

1 Like

Thanks a lot. You have more ideas.

But I found this video. https://www.youtube.com/watch?v=9hYwSISq_mQ&t=105s

I don’t understand how Python connects with goPiGo.

1 Like

I think the user is inside the desktop of gopigo using VNC viewer. I am wondering whether there is any steps for that.

1 Like

A couple things to note about that video:

  1. as you guessed it is using VNC to get to the desktop
  2. The ability to get to the desktop is only available in the advanced OS “Raspbian For Robots”
  3. The video is nearly 4 years old now - The Raspbian For Robots has had two major updates - first to be based on Raspbian Stretch, and lately to be based on Raspbian Buster.
  4. That video demonstrates coding in Python2.7 - you should use Python 3 so the code in the video may not run without updating the print statements to have parens - print “xyz” becomes print(“xyz”)
  5. Note: R4R uses DHCP to obtain a WiFi connection through your router. It does not act as an access point, so either your router must be “open” or you will need to set the WiFi SSID and WiFi password for the R4R OS.

I am still running the Stretch based Raspbian For Robots and I see that both IDLE and Thonny are available, so if you are set on using IDLE, you will need to burn a version of Raspbian For Robots to your SD card.

For Pi 3B, 3B+ I suggest the version I am using (stretch based):
https://www.dexterindustries.com/download/r4r_stretch

Raspbian For Robots offers two ways to get to the desktop, first a web browser interface and second remote desktop or vnc. The remote desktop/vnc client method sometimes presents a challenge to get configured/connected for beginners, so the web browser approach is best for getting to the desktop.

R4R also offers two ways to get to a command line shell, first a web browser interface, and second through SSH. (Some folks also use SSH to create an X11 window manager for graphics, but that is for more advanced folks than me.)
 
This is the web browser landing page for Raspbian For Robots:

For Pi4 you must use the beta / “experimental” Buster based Raspbian For Robots here:
https://www.dexterindustries.com/download/r4r_buster

The instruction page for all this is:

Learning on the DexterOS that you have running already will save you time. Consider it.

( I’ve got to get on to programming my bot now.)

1 Like

Very good help. I will try DexterOS now and later will try the stretch.

Thanks

2 Likes

Reji18,

I am also a “beginner”, and the best piece of advice is not take things too seriously. It’s a very useful tool to learn about robotics, just don’t forget to have fun!

As to my choice of programming environment, I would strongly recommend that you stay with DexterOS and the “blockly” programming interface until you really get to know what the robot can do.

Don’t worry about Jupyter Notebooks or anything else like that. Just program, play and have a good time.

Even though it’s designed to be simple and easy to use, it’s still a powerful tool and you can do almost everything anyone else can do in Python, etc.

I still use it to “sandbox” ideas without having to worry about all the picky details in other languages.

Don’t be in a rush. Experiment, play, try things out, ask questions, and most of all, don’t forget to have fun.

1 Like