leds-blinkm.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. The leds-blinkm driver supports the devices of the BlinkM family.
  2. They are RGB-LED modules driven by a (AT)tiny microcontroller and
  3. communicate through I2C. The default address of these modules is
  4. 0x09 but this can be changed through a command. By this you could
  5. dasy-chain up to 127 BlinkMs on an I2C bus.
  6. The device accepts RGB and HSB color values through separate commands.
  7. Also you can store blinking sequences as "scripts" in
  8. the controller and run them. Also fading is an option.
  9. The interface this driver provides is 2-fold:
  10. a) LED class interface for use with triggers
  11. ############################################
  12. The registration follows the scheme:
  13. blinkm-<i2c-bus-nr>-<i2c-device-nr>-<color>
  14. $ ls -h /sys/class/leds/blinkm-6-*
  15. /sys/class/leds/blinkm-6-9-blue:
  16. brightness device max_brightness power subsystem trigger uevent
  17. /sys/class/leds/blinkm-6-9-green:
  18. brightness device max_brightness power subsystem trigger uevent
  19. /sys/class/leds/blinkm-6-9-red:
  20. brightness device max_brightness power subsystem trigger uevent
  21. (same is /sys/bus/i2c/devices/6-0009/leds)
  22. We can control the colors separated into red, green and blue and
  23. assign triggers on each color.
  24. E.g.:
  25. $ cat blinkm-6-9-blue/brightness
  26. 05
  27. $ echo 200 > blinkm-6-9-blue/brightness
  28. $
  29. $ modprobe ledtrig-heartbeat
  30. $ echo heartbeat > blinkm-6-9-green/trigger
  31. $
  32. b) Sysfs group to control rgb, fade, hsb, scripts ...
  33. #####################################################
  34. This extended interface is available as folder blinkm
  35. in the sysfs folder of the I2C device.
  36. E.g. below /sys/bus/i2c/devices/6-0009/blinkm
  37. $ ls -h /sys/bus/i2c/devices/6-0009/blinkm/
  38. blue green red test
  39. Currently supported is just setting red, green, blue
  40. and a test sequence.
  41. E.g.:
  42. $ cat *
  43. 00
  44. 00
  45. 00
  46. #Write into test to start test sequence!#
  47. $ echo 1 > test
  48. $
  49. $ echo 255 > red
  50. $
  51. as of 6/2012
  52. dl9pf <at> gmx <dot> de