Serial library with

edited March 2016 in Python Mode

Generally, is there library documentation for the libraries with

Specifically, I'm trying to use the Serial library. Guessing the syntax from the Java documentation, I have:


def setup():
    #setup the serial port
    print Serial.list()
    portIndex = 4
    LF = 10
    print "Connecting to ", Serial.list()[portIndex]
    myPort = Serial(Serial.list()[portIndex], 9600)   # this seems to need a first argument referring to the sketch object (analagous to "this" argument in Java)
def draw():
def serialEvent(evt):
    inString = evt.readString()
    print inString

Anyone have any advice on making this work?

As a side note, it would be nice to add a as a subcategory in the forums under "Questions and Modes".


Sign In or Register to comment.