leds-blinkm.rst 2.0 KB

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