From 057730cc3b61246488f276a586d346d2c35a14ac Mon Sep 17 00:00:00 2001
From: ebp1g21 <ebp1g21@soton.ac.uk>
Date: Sun, 14 May 2023 12:48:18 +0000
Subject: [PATCH] Upload New File

---
 stub.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 stub.c

diff --git a/stub.c b/stub.c
new file mode 100644
index 0000000..81c586f
--- /dev/null
+++ b/stub.c
@@ -0,0 +1,27 @@
+#include "pico/stdlib.h"
+#include "hardware/pio.h"
+#include "ws2812.pio.h"
+
+#define IS_RGBW true
+#define WS2812_PIN 28
+
+#define BUTTON_1_PIN 20
+#define BUTTON_2_PIN 21
+#define BUTTON_3_PIN 22
+
+static inline void put_pixel(uint32_t pixel_grb) {
+    pio_sm_put_blocking(pio0, 0, pixel_grb << 8u);
+}
+
+static inline uint32_t urgb_u32(uint8_t r, uint8_t g, uint8_t b) {
+    return
+            ((uint32_t) (r) << 8) |
+            ((uint32_t) (g) << 16) |
+            (uint32_t) (b);
+}
+
+int main() {
+
+    // Write this method to make the 3 buttons toggle the ws2812 between red, green and blue
+
+}
\ No newline at end of file
-- 
GitLab