MakingThings
Make Controller Kit
Firmware API
MAKE Zine

Serial - OSC
[OSC]

Configure the Serial Port and Read Characters via OSC. More...

Properties

The Serial Subsystem has eight properties:

Baud
The Baud rate of the device. Valid from 110 baud to >2M baud
To set baud rate to 115200, for example, send the message
/serial/baud 112500
Bits
The number of bits per character. Can range from 5 to 8
To set the number of bits to 7, for example, send the message
/serial/bits 7
StopBits
The number of stop bits per character. Can be 1 or 2
To set the number of stop bits to 2, for example, send the message
/serial/stopbits 2
Parity
The parity of the character. Can be -1 for odd, 0 for none or 1 for even
To set the parity to even, for example, send the message
/serial/parity 1
HardwareHandshake
Whether hardware handshaking (i.e. CTS RTS) is being employed.
To set hardware handshaking on, for example, send the message
/serial/hardwarehandshake 1
Readable
How many characters are presently available to read.
To check, for example, send the message
/serial/readable
Char
This property is the mechanism by which individual characters can be sent and received
To send a character 32 (a space), for example, send the message
/serial/char 32
To get a character send the message
/serial/char
In this case the reply will be an unsigned value between 0 and 255 or -1 if there is no character available.
Block
This property allows for reading or writing a block of characters to/from the serial port. If you're writing a block, you must send the block you want to write as an OSC blob.
For example, to send a block:
/serial/block blockofchars
To get a block, send the message
/serial/block
In this case the reply will be a block of up to 100 unsigned chars, or the chars currently available to read from the serial port.
Make Controller Kit