https://github.com/leocolomb/ofxsimpleserial
Simplifies Serial Communication from openFrameworks
https://github.com/leocolomb/ofxsimpleserial
addon arduino c-plus-plus openframeworks
Last synced: 12 months ago
JSON representation
Simplifies Serial Communication from openFrameworks
- Host: GitHub
- URL: https://github.com/leocolomb/ofxsimpleserial
- Owner: LeoColomb
- Created: 2012-11-24T20:55:17.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-03T16:06:11.000Z (over 12 years ago)
- Last Synced: 2025-03-25T14:03:06.571Z (about 1 year ago)
- Topics: addon, arduino, c-plus-plus, openframeworks
- Language: C++
- Size: 145 KB
- Stars: 17
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ofxSimpleSerial
---------------
**An addon that simplifies the Serial Communication from [openFrameworks](http://www.openframeworks.cc/)**
* Automatic message completion
Complete messages exist between `\n`'s, sent for example from Arduino with `Serial.println()`. If the complete message cannot be read during one "update" it will keep listening for updates for it to be completed.
* Simply use the message property to get the latest complete message
* Listen for the `NEW_MESSAGE` event to get properly notified
* Write to the serial connection using a string
### Examples
* Reading one piece of data
* Reading multiple pieces of data
* Writing one piece of data (string)
* Writing multiple pieces of data (string)
###### All examples are made with openFrameworks and Arduino
### Simple protocol to read data
* The addon writes an `r` to the serial connection
* The other party (Arduino for example) sends an update after it recieves this.
###### This ensures an in-sync transfer of data