keyleds.cr v1.0.0

A Crystal interface to keyleds

keyleds.cr

A Crystal interface to the libkeyleds library.

API Documentation

License

As a derived work of keyleds, these bindings are licensed under the GNU GPLv3.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      keyleds:
        github: nickbclifford/keyleds.cr
    
  2. Run shards install

Usage

require "keyleds"

APP_ID = 1_u8

Keyleds::Device.open("/dev/hidraw1", APP_ID) do |device|
  puts device.name

  device.set_led_block(:logo, red: 0, blue: 255, green: 0)
  device.commit_leds
end

Contributing

  1. Fork it (https://github.com/nickbclifford/keyleds.cr/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

Owner
github statistic
  • 0
  • 1
  • 0
  • 0
  • 1 day ago
  • April 7, 2021
License

GNU General Public License v3.0

Links
Synced at

Tue, 20 Apr 2021 08:18:20 GMT