Anonymous

Equipment/VinylCutterOld: Difference between revisions

From London Hackspace Wiki
Line 54: Line 54:
  require "rubygems"
  require "rubygems"
  require "serialport"
  require "serialport"
 
  plotter = SerialPort.new("/dev/ttyUSB2")
  plotter = SerialPort.new("/dev/ttyUSB2")
  plotter.baud=(9600)
  plotter.baud=(9600)
Line 61: Line 61:
  plotter.data_bits=(8)
  plotter.data_bits=(8)
  plotter.stop_bits=(1)
  plotter.stop_bits=(1)
 
  serialData = "IN;SP1;PU3999,6429;PD2693,5186;PD929,5557;PD1707,3932;PD809,2369;PD2596,2606;PD3805,1269;PD4131,3042;PD5776,3778;PD4191,4636;PD3999,6429;PD3999,6429;"
  serialData = "IN;SP1;PU3999,6429;PD2693,5186;PD929,5557;PD1707,3932;PD809,2369;PD2596,2606;PD3805,1269;PD4131,3042;PD5776,3778;PD4191,4636;PD3999,6429;PD3999,6429;"
 
  plotter.write(serialData)
  plotter.write(serialData)
24

edits