Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hideakitai/ofxserial
Tiny extension to set options of ofSerial communication
https://github.com/hideakitai/ofxserial
Last synced: 2 days ago
JSON representation
Tiny extension to set options of ofSerial communication
- Host: GitHub
- URL: https://github.com/hideakitai/ofxserial
- Owner: hideakitai
- License: mit
- Created: 2015-12-25T07:22:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-25T07:45:06.000Z (almost 9 years ago)
- Last Synced: 2024-03-16T10:35:05.258Z (8 months ago)
- Language: C++
- Size: 12.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ofxSerial
---------Tiny extension to set options of ofSerial communication.
Tested with Arduino & FTDI driver on Mac OSX 10.11 with FTDI and Windows 10.## Usage
```
ofxSerial serial;
ofApp::setup()
{
serial.setup(YOUR_SERIAL_PORT, 9600);
serial.setDataBits(OFXSERIAL_DATABIT_8);
serial.setParity(OFXSERIAL_PARITY_ODD);
serial.setStopBits(OFXSERIAL_STOPBIT_2);
}
```## API
```
void ofxSerial::setParity(parity p)
void ofxSerial::setStopBits(stop_bits s)
void ofxSerial::setDataBits(data_bits d)
```Available parameters are defined as follows.
```
OFXSERIAL_PARITY_NONE
OFXSERIAL_PARITY_EVEN
OFXSERIAL_PARITY_ODD
``````
OFXSERIAL_STOPBIT_1
OFXSERIAL_STOPBIT_2
``````
OFXSERIAL_DATABIT_8
OFXSERIAL_DATABIT_7
OFXSERIAL_DATABIT_6
OFXSERIAL_DATABIT_5
```## Dependencies
none (ofSerial)
## License
MIT License