#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "pico/binary_info.h"
#define LED_PIN 26
void setup() {
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
// Initialize the Pico SDK
stdio_init_all();
// Print a message indicating the program has started
bi_decl(bi_program_description("LED Ring Color Change Example"));
}
int main() {
setup();
uint8_t color = 0; // Variable to store the color value
while (true) {
// Set the LED to the current color
gpio_put(LED_PIN, color);
// Increment the color for the next iteration
color = (color + 1) % 256;
// Add a delay to control the speed of color change
sleep_ms(100);
}
return 0;
}