aw2013

Crates.ioaw2013
lib.rsaw2013
version2.1.0
sourcesrc
created_at2023-01-26 19:04:26.501139
updated_at2024-01-13 15:02:29.632046
descriptionDriver for the AW2013 3-Channel LED Controller
homepagehttps://github.com/DASPRiD/aw2013
repositoryhttps://github.com/DASPRiD/aw2013
max_upload_size
id768797
size27,768
Ben Scholzen (DASPRiD)

documentation

https://docs.rs/aw2013

README

Rust AW2013 driver

This is a no-std driver for the AW2013 3-Channel LED Controller.

Version 2 of the driver utilizes embedded-hal 1.x crate in order to be compatible with a large array of hardware.

RGB LED wiring

While the controller itself does not care how you wire an RGB LED to it, it is recommended to wire red, green and blue to LED 0, 1 and 2 respectively.

Examples

You can find examples in the examples directory which demonstrate the different use cases.

Quirks of breathing mode

The datasheet of the AW2013 is not clear about setting a maximum brightness in this mode. With the brightness for each LED set to either 0x00 or 0xff there is no issue. When using values in between it affects the actual timing of the controller. Lower values will thus result in the breathing cycle getting shorter than configured. This leads to the following issues:

  • With a brightness value too low and a relatively short breathing cycle an LED looks like it'd blink instead of breathing.
  • With different brightness values for each LED but the same timing set they will quickly go out of sync.

Thus, you should always follow these advices if not using 0x00 or 0xff as a brightness value:

  • Always use brightness values >= 0x32.
  • Always use the same brightness value for all active LEDs.
Commit count: 7

cargo fmt