← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-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