← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdvin <[email protected]>2025-09-23 16:48:42 +0200
committerEdvin <[email protected]>2025-09-23 16:48:42 +0200
commite4d168465357b51c08355dc2f315586ff7ec3758 (patch)
tree490e9f72532b6895eebab806b93a686b355e1ed1
parentee756f7e231300cdf8e110441e0699a8de1abdfa (diff)
Added readmeHEADmaster
-rw-r--r--README.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f606d82
--- /dev/null
+++ b/README.md
@@ -0,0 +1,30 @@
+# `rgb_led`
+
+`rgb_led` is a simple component for ESP32 to control RGB LEDs.
+
+## Colors
+
+- White
+- Yellow
+- Purple
+- Red
+- Cyan
+- Green
+- Blue
+- Black
+
+These are addressed as `rgb_[color]`, for example `rgb_white`.
+
+## Example usage
+
+Create an LED variable, say `MY_LED`.
+
+ rgb_led MY_LED;
+
+Initialize it with each corresponding pin.
+
+ rgb_init_LED(&MY_LED, red_pin, green_pin, blue_pin);
+
+And one can then set the color of the LED.
+
+ rgb_set_color(&MY_LED, rgb_purple); \ No newline at end of file