Skip to content

An Arduino interface abstraction based on pySerial

Notifications You must be signed in to change notification settings

br382/arduinoInterface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

arduinoInterface

usage:

>> python
>> from arduinoInterface import arduinoInterface
>> a = arduinoInterface() #(port=None, baud=9600, cycle_delay=0.01)
>> #defaults to auto-finding first available port
>> a.writeln('hi Arduino')
>> a.write('new data')
>> a.read()
>> #returns text from Arduino and possibly waiting for transmission completion due to clock speed differences
>> a.close()                      #be kind.. and rewind.
>> a.closeAll(baud=None)          #close all pesky ports, returns int() of failed .close(), but does not change stored port/baud.
>> a.open(port='COM1', baud=9600) #specify particular port
>> a.clearBuf()                   #clear internal string buffer (not pending port values)
>> a.findPort(baud=None)          #searches for first available port with specified baud and .open()'s it.
>> a.findAllPorts(baud=None)      #returns list() of port-baud combinations found to be valid
>> a.waited()                     #returns seconds of delay during last .read() method call

About

An Arduino interface abstraction based on pySerial

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages