Fix port
This commit is contained in:
@@ -2,12 +2,13 @@
|
|||||||
from pyaxidraw import axidraw # import module
|
from pyaxidraw import axidraw # import module
|
||||||
ad = axidraw.AxiDraw() # Initialize class
|
ad = axidraw.AxiDraw() # Initialize class
|
||||||
ad.interactive() # Enter interactive context
|
ad.interactive() # Enter interactive context
|
||||||
ad.options.port = "/dev/ttyAXI"
|
ad.options.port = "/dev/ttyACM0"
|
||||||
if not ad.connect(): # Open serial port to AxiDraw;
|
if not ad.connect(): # Open serial port to AxiDraw;
|
||||||
quit() # Exit, if no connection.
|
quit() # Exit, if no connection.
|
||||||
ad.options.units = 1 # set working units to cm.
|
ad.options.units = 1 # set working units to cm.
|
||||||
|
ad.options.model = 2 # set model to AxiDraw V3/A3
|
||||||
# Absolute moves follow:
|
# Absolute moves follow:
|
||||||
ad.moveto(1, 1) # Pen-up move to (1 inch, 1 inch)
|
ad.moveto(10, 10) # Pen-up move to (10cm, 10cm)
|
||||||
ad.lineto(2, 1) # Pen-down move, to (2 inch, 1 inch)
|
ad.lineto(20, 10) # Pen-down move, to (20cm, 10)
|
||||||
ad.moveto(0, 0) # Pen-up move, back to origin.
|
ad.moveto(0, 0) # Pen-up move, back to origin.
|
||||||
ad.disconnect() # Close serial port to AxiDraw
|
ad.disconnect() # Close serial port to AxiDraw
|
||||||
|
|||||||
Reference in New Issue
Block a user