https://github.com/aurimasniekis/serialports
Crystal libserialport binding library
https://github.com/aurimasniekis/serialports
Last synced: 3 months ago
JSON representation
Crystal libserialport binding library
- Host: GitHub
- URL: https://github.com/aurimasniekis/serialports
- Owner: aurimasniekis
- License: mit
- Created: 2017-10-20T16:18:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-20T16:20:19.000Z (over 7 years ago)
- Last Synced: 2025-01-28T01:46:58.942Z (5 months ago)
- Language: Crystal
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SerialPorts
LibSerialPort binding
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
serialports:
github: aurimasniekis/serialports
```## Usage
```crystal
require "serialports"port = SerialPorts::Port.new "/dev/cu.usbmodem1423"
pp port.metadata
port.open
pp port.configuration
port.config.baudrate = 115200
port.config.save
pp port.configurationio = port.io
while true
result = io.getsputs result unless result.nil?
while port.input_waiting < 1
sleep 1
end
end```
## Development
TODO: Write development instructions here
## Contributing
1. Fork it ( https://github.com/aurimasniekis/serialport/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request## Contributors
- [aurimasniekis](https://github.com/aurimasniekis) Aurimas Niekis - creator, maintainer