Skip to content

mywdka/plotterturtle

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

plotterturtle

Introduction

This is a small python module linking python's Turtle Graphics to the Chiplotle plotter library

How-to

Connecting a plotter

The plotters i use are HP 7475A plotters. Another plotter will probably work too, although you may have to change the scaling.

Connect the plotter with a USB-to-Serial adapter. Install the drivers. For the ones we have at the WDKA, this driver will work. You will also need a converter cable, like this. So the setup is like this:

[plotter]-[converter cable]-[usb to serial cable]-[computer]

The little DIP-switches next to the connector are set like this:

S2 S1 Y US A3 B4 B3 B2 B1

vv vv v ^^ ^^ ^^ vv ^^ vv

Installing the chiplotle library

  • First install pip. Open a terminal window, and type: sudo easy_install pip
  • Then install chiplotle. type: sudo pip install chiplotle
  • Run chiplotle once. type: chiplotle and press ENTER two times. It will generate some files in the home-folder. When using this in a workshop, make sure this is done for the user that is logged in at that moment, else python will give an error.

Write a program

  • Download this repository, open the mydrawing.py example in a text editor, (for instance Sublime text), run it (in Sublime-Text: command-B), extend it.

Plot it!

  • When there are no errors, the console will show a .plt file is being created in the plots/ folder, with the current time as its file name. To plot this file: open a terminal window and run chiplotle . After the plotter has been found, type for instance plotter.write_file('140318.plt') Of course, make sure the directory is correct.

Supported commands

  • begin()
  • end()
  • forward(x)
  • backward(x)
  • left(x)
  • right(x)
  • setheading(x)
  • goto(x,y)
  • speed(x)
  • up()
  • down()
  • randint(x,y)

Interactive mode

To make the plotter execute the commands on the fly, change the OFFLINE = True to False in the plotterturtle.py file.


Written by Thomas Rutgers for the Willem de Kooning Academy, Rotterdam Compatible with the laser-cut physical turtleblocks for teaching programming

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages