tooxoot / plotR

0 stars 0 forks source link

Actually plotting #14

Open tooxoot opened 6 years ago

tooxoot commented 6 years ago

After creating valid HPGL output the next step will be to actually wire up the plotter an get it to work!

Wire up to Linux After plugin in the adapter it is possible to figure out the tty port via dmesg. Assuming that the port is ttyXXX , ls -l /dev/ttyUSB0 will print out the assigned usergroup. If being member of this usergroup does not help with getting read / write permission, sudo chmod 666 /dev/ttyUSB0 will do the job.

Writing output to plotter Using python's pySerial module writing commands from a file is done like this:

import serial

# Read command file. Commands should be in separate lines.
commands = open('command_file').readlines()

# Initialize with path, baudrate, bytesize, and parity
ser = serial.Serial('/dev/ttyXXX', 9600, 8, 'O')  # open serial port

for command in commands:
    ser.write(command.encode())     # write to plotter

Plotter's coordinate system

gescannt_20171116-2200-1

gescannt_20171116-2203-1

tooxoot commented 6 years ago

Use the point concatenation shown in #11. Also use velocity 1 → VS1