๐Ÿ“ฆ nickbclifford / keyleds.cr

A Crystal interface to keyleds

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ GNU General Public License v3.0
๐Ÿ“ฅ Clone https://github.com/nickbclifford/keyleds.cr.git
HTTPS git clone https://github.com/nickbclifford/keyleds.cr.git
SSH git clone git@github.com:nickbclifford/keyleds.cr.git
CLI gh repo clone nickbclifford/keyleds.cr
Nick Clifford Nick Clifford format f8410f3 4 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ spec
๐Ÿ“ src
๐Ÿ“„ .editorconfig
๐Ÿ“„ .gitignore
๐Ÿ“„ LICENSE
๐Ÿ“„ README.md
๐Ÿ“„ shard.yml
๐Ÿ“„ README.md

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

  • Add the dependency to your shard.yml:
dependencies:
     keyleds:
       github: nickbclifford/keyleds.cr

  • 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

  • Fork it ()
  • 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