{"id":21910248,"url":"https://github.com/mcer12/aw210xx","last_synced_at":"2026-05-19T15:12:02.503Z","repository":{"id":246986756,"uuid":"824764414","full_name":"mcer12/AW210xx","owner":"mcer12","description":"Arduino library for Awinic AW21036 and AW21024 LED drivers","archived":false,"fork":false,"pushed_at":"2024-07-07T15:49:26.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T08:24:01.470Z","etag":null,"topics":["i2c","led-controller","led-driver","led-pwm-controller"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcer12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-05T22:24:03.000Z","updated_at":"2024-07-09T22:40:39.000Z","dependencies_parsed_at":"2024-07-07T17:04:19.503Z","dependency_job_id":null,"html_url":"https://github.com/mcer12/AW210xx","commit_stats":null,"previous_names":["mcer12/aw210xx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcer12%2FAW210xx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcer12%2FAW210xx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcer12%2FAW210xx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcer12%2FAW210xx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcer12","download_url":"https://codeload.github.com/mcer12/AW210xx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924996,"owners_count":20532898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["i2c","led-controller","led-driver","led-pwm-controller"],"created_at":"2024-11-28T17:29:07.585Z","updated_at":"2026-05-19T15:12:02.472Z","avatar_url":"https://github.com/mcer12.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AW210xx Library for Arduino\n\nThe `AW210xx` library provides an interface to control Awinic AW21036 and AW21024 LED drivers via I2C on Arduino and compatible boards.  \nhttps://www.awinic.com/en/productDetail/AW21036QNR  \nhttps://www.awinic.com/en/productDetail/AW21024QNR  \n\n## Features\n\n- 8-bit global brightness\n- 8-bit individual brightness\n- Secondary 8-bit individual brightness\n- Programmable PWM frequency from 122hz to 62khz\n- Phase shift\n- Slew rate\n- Atomatic power saving when all channels are off\n- Programmable automatic breathing patterns (not implemented in this library)\n\n## Compatilility\n- Tested on ESP8266, should work on most Arduino compatible boards with Wire library.\n\n## Installation\n\n1. Download the zip archive of this repository.\n2. Unzip the downloaded file and move it to your Arduino libraries directory, typically located in `Documents/Arduino/libraries`.\n3. Rename the folder to `AW210xx` if it isn't already named that.\n\n## Usage\n\nInclude the library in your sketch and initialize the device.\n\n## API Reference\n\n### Initialization\n\n- `void begin(uint8_t addr = ADDR_AW, uint32_t i2cSpeed = I2C_SPEED, PWMFrequency freq = FREQ_2K, bool phaseShift = true)`\n  - Initializes the device with the given I2C address, speed, frequency, and phase shift setting.\n\n- `void update()`\n  - Applies changes, required only when changing the brightness settings.\n\n- `void reset()`\n  - Resets the driver to factory defaults.\n\n### Requesting data from the led driver\n\n- `uint8_t getGlobalBri()`\n  - Gets the global brightness value.\n\n- `uint8_t getBri(uint8_t channel)`\n  - Gets the brightness value for a specific channel (0-36 for AW21036, 0-24 for AW21024).\n\n- `uint8_t getCol(uint8_t channel)`\n  - Gets the secondary brightness value of a channel.\n\n- `uint8_t readRegister(uint8_t reg)`\n  - Reads a byte from the specified register.\n\n### Updating data\n\n- `void setGlobalBri(uint8_t value)`\n  - Sets the global brightness.\n  \n- `void setBri(uint8_t channel, uint8_t value)`\n  - Sets the brightness for a specific channel.\n\n- `void setCol(uint8_t channel, uint8_t value)`\n  - Sets the secondary brightness for a specific channel.\n\n- `void setCombinedBri(uint8_t channel, uint16_t value)`\n  - Combines both Col and Bri values, accepts values 0-510 (255+255)\n\n- `void setCombinedBriCIE(uint8_t channel, uint16_t value)`\n  - CIE adjusted brightness for smooth linear dimming, accepts values 0-255 (!!!)\n  \n- `void setPhaseShift(bool en)`\n  - Enables or disables phase shift.\n\n- `void setSlewRate(uint8_t riseTime, uint8_t fallTime)`\n  - Configures the slew rate for rise and fall times. \n  - Possible values for riseTime: 1 (default), 6 (ns)\n  - Possible values for fallTime: 1 (default), 3, 6, 10 (ns)\n\n- `void setFreq(PWMFrequency freq)`\n  - Sets the PWM frequency.\n\n- `void setChipEnable(bool enable)`\n  - Enables or disables the chip.\n\n- `void setPowerSaving(bool enable)`\n  - Enables or disables power saving mode.\n\n- `void setRegister(uint8_t registerAddress, uint8_t value)`\n  - Writes a byte to the specified register.\n\n## License\n\nThis library is licensed under the MIT License. See the `LICENSE` file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcer12%2Faw210xx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcer12%2Faw210xx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcer12%2Faw210xx/lists"}