Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clusterm/omega2-ws2811-lkm
Linux kernel module for Onion Omega2 to control WS2811/WS2812 LEDs
https://github.com/clusterm/omega2-ws2811-lkm
Last synced: 25 days ago
JSON representation
Linux kernel module for Onion Omega2 to control WS2811/WS2812 LEDs
- Host: GitHub
- URL: https://github.com/clusterm/omega2-ws2811-lkm
- Owner: ClusterM
- License: gpl-3.0
- Created: 2021-03-23T20:48:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-20T18:57:00.000Z (10 months ago)
- Last Synced: 2024-11-24T19:48:12.607Z (29 days ago)
- Language: C
- Size: 19.5 KB
- Stars: 18
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# omega2-ws2811-lkm
Linux kernel module for Onion Omega2 to control WS2811/WS2812 LEDs.It's using a bit-banging, so you can use any GPIO pin. Also, it supports multiple pins simultaneously and writing them at the same time, so you can connect multiple LED chains to different pins and increase FPS.
## How to load
Put **ws2811.ko** into /lib/modules/*kernel_version*/ directoryThere are two parameters:
* **pins** - array of pin numbers
* **led_count** - LED count per pinFor example you are using pins 11,15,16,17 and 300 LEDs per each pin, command to load module:
insmod ws2811 pins=11,15,16,17 led_count=300
or create **/etc/modules.d/ws2811** file and put this string there:
ws2811 pins=11,15,16,17 led_count=300
to load the module automatically at the system boot. Don't forget to set up GPIO muxing if need.
## How to use
If the module is loaded successfully **/dev/ws2811** pseudo-file should appear. You can read and write it - three bytes per RGB LED.
Synchronization appears after each writes operation, so it is desirable to write all bytes at once.