PCEval / esp32 /level1 /led_RGB_basic /src /main_esp.cpp
eunzee's picture
upload Arduino Uno and ESP32 project files
8e53a3e verified
Raw History Blame Contribute Delete
330 Bytes
/**
Turns on a RGB LED connected to a specified pin.
3 APR 2025 by Blind Author
*/
#include <Arduino.h>
const int R = 5;
const int G = 4;
const int B = 2;
void setup() {
pinMode(R, OUTPUT);
pinMode(G, OUTPUT);
pinMode(B, OUTPUT);
analogWrite(R, 255);
analogWrite(G, 255);
analogWrite(B, 0);
}
void loop() {
}