serialports
SerialPorts
LibSerialPort binding
Installation
Add this to your application's shard.yml
:
dependencies:
serialports:
github: aurimasniekis/serialports
Usage
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.configuration
io = port.io
while true
result = io.gets
puts result unless result.nil?
while port.input_waiting < 1
sleep 1
end
end
Development
TODO: Write development instructions here
Contributing
- Fork it ( https://github.com/aurimasniekis/serialport/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- aurimasniekis Aurimas Niekis - creator, maintainer
Repository
serialports
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- almost 8 years ago
- October 20, 2017
License
MIT License
Links
Synced at
Tue, 02 Sep 2025 17:54:52 GMT
Languages