Python Turtle Spirograph Pancakes - SCOPES Digital Fabrication

Lesson Details

Age Ranges
Fab-Programming.2, Fab-Safety.2, Fab-Fabrication.2, HSF.BF.A2
Additional Contributors

You need to login or register to bookmark/favorite this content.


Miguel Valenzuela
Miguel Valenzuela
Miguel Valenzuela is a California Registered Civil Engineer, maker, and the inventor of PancakeBot.  Miguel currently runs the PancakeBot Innovation Center and Makerspace in Vestfossen Norway, a space dedicated to art and cultural centric innovation with a tasty twist. Miguel’s… Read More


Spirograph is the name given to a drawing tool that makes “mathematical roulette curves” known as hypotrochoids.


In this lesson, you will learn how to use Python Turtle* to create a digital Spirograph, which will generate a Spirograph design, and convert that drawing into an edible pancake!


The lesson will provide the base code for the major elements of working with the Python Turtle library as well as the coordinate conversion to G-Code. Students will learn how to represent different curves and approximate them with short line segments and changes in the heading of the Turtle drawing tool.


*Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966.

For more information visit.

What You'll Need

  1. PancakeBot
  2. Python Emulator or Python Idle
  3. Computer that runs Python
  4. Paper and Pencil for Curve Drawing
  5. Installation of Python version 3.0 or greater. (



When operating the PancakeBot, there are few precautions one must take.


  1. Keep lose hair or clothes away from the belts while the PancakeBot is moving. The belts and motors are low powered but may pinch fingers during movement if caught between the belt and the drive motors.
  2. Always assume the griddle is hot. The griddle will remain hot even after it is unplugged and turned off.
  3. Take care when removing the thermostat heating probe. The metal probe should always assumed to be hot.
  4. Always unplug the electric cord from the power outlet after use.
  5. The griddle may warp slightly during extended usage. Drop the temperature down on the thermostat should this occur.
  6. The griddles for PancakeBot are voltage specific and there are different voltages for US(110V) and EU(220V) approved Griddles. Check the bottom of the griddle to make sure you are using the right voltage.
  7. Always assume a risk of fire when using any cooking appliance. Discuss any fire risks with the appropriate safety personnel.
  8. Check the temperatures of the pancakes to insure they are safe before eating them. Steam may get trapped inside air pockets in the batter.


Lesson Materials

The Instructions

Printing A Spiral

You will start off the lesson by running a Python Program that draws a spiral and exports the coordinates of the lines to G-Code. You will then print the pancake from the G-Code file.

Run the Python Program named Watch and observe how the turtle draws out the spiral pancake. When the turtle is complete with drawing the pancake, save the GCODE file and copy it to your SD card for printing to the PancakeBot.

The colors of the path the turtle takes corresponds with the rest of the guide.

This will be the resulting pancake from the code.

Understanding the Curves created by the Spirograph

A Spirograph creates elaborate spirals by using different shapes that spin in or around each other. Although there is a lot of geometry and mathematical calculations that can be used to achieve the desired spiral, we can use short straight lines drawn in Python Turtle to approximate those spirals with a few lines of code. One of the ways to do this is to hand draw your own spirograph and observe the critical movements needed to generate the design. You will hand draw or trace the curves created by the petals of a daisy and track the steps involved to make those curves.