O'Reilly logo

Raspberry Pi Robotic Blueprints by Richard Grimmett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A simple Python drawing program

Now that the robot can draw, you can add a simple graphical program that allows you to draw on the screen and then output this set of points to the drawing robot. Let's start with a simple draw program that is based on pygame:

A simple Python drawing program

When you run this program, either directly with a monitor and keyboard connected to Raspberry Pi or with the VNC Server viewer, you will see the following:

A simple Python drawing program

As you move the mouse in the draw window, you will notice the x and y location print in the terminal window. What you'll now do is save the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required