Kiibohd Controller
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

exampleAPI.bash 1006B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. # ISSILed
  3. # Virtual Serial Port API Example
  4. # Jacob Alexander 2015
  5. # XXX Set this to match your virtual serialport
  6. # TODO Show examples for Mac OSX and Cygwin/Windows
  7. SERIALPORT=/dev/ttyACM0
  8. # NOTE: Make sure you don't write too quickly to the serial port, it can get overwhelmed by a modern computer
  9. # Generally this just means commands will get ignored
  10. # I'm using 100 ms sleeps here, but much smaller are probably sufficient
  11. # Clear out cli buffer
  12. printf "\r" > $SERIALPORT
  13. # Write to ISSI Page
  14. # Arguments
  15. # - page
  16. # - starting address
  17. # - data (usually brightness) (8 bits)
  18. #
  19. # For brightness control, set the starting address to 0x24
  20. # By default only page 0x00 is used
  21. # There are 8 pages of memory (these can be cycled through for animiations)
  22. # 144 led channels
  23. # Page 0x0A is used for configuration
  24. # See the datasheet for full details http://www.issi.com/WW/pdf/31FL3731C.pdf
  25. sleep 0.1
  26. printf "ledWPage 0x00 0x24 0x10 0x20 0x30 0x40 0x50\r" > $SERIALPORT