jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

how to write to serial port in 'processing' python mode #232

Open todool opened 6 years ago

todool commented 6 years ago

In java processing program I write to the serial port via: import processing.serial.*; port = new Serial(this,Serial.list()[0] , 9600); port.write('3'); And in python processing: add_library('serial') port = Serial(this,Serial.list()[0] , 9600) port.write('3') In Java everything works fine but in python a got the error on the statement 'port.write('3'): "processing.app.SketchException: TypeError: write(): expected 2 args; got 1"

help would be appreciated!

villares commented 6 years ago

Seems related to https://github.com/jdf/Processing.py-Bugs/issues/227