#define RED_PIN A5 # GPIO 26
#define GREEN_PIN A1 # GPIO 25
#define BLUE_PIN A0 # GPIO 4
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
// Initialize the LED pins as output
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
}
void loop() {
// generate random values between 0 and 255 for each color
int blueValue = random(0, 256);
int greenValue = random(0, 256);
int redValue = random(0, 256);
// set the LED colors
// invert value since it's common anode
analogWrite(, 255 - blueValue);
analogWrite(25, 255 - greenValue);
analogWrite(4, 255 - redValue);
delay(1000); // wait one second before changing the colour
}