Skip to content
Snippets Groups Projects
Commit 057730cc authored by ebp1g21's avatar ebp1g21
Browse files

Upload New File

parent 5ca7966b
No related branches found
No related tags found
No related merge requests found
stub.c 0 → 100644
#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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment