#include <WiFi.h>
const char ssid[] = "Wokwi-GUEST";
const char pass[] = "";
const int pinRed = 2;
const int pinGreen = 4;
const int pinBlue = 16;
void setup() {
pinMode(pinRed, OUTPUT);
pinMode(pinGreen, OUTPUT);
pinMode(pinBlue, OUTPUT);
WiFi.begin(ssid, pass);
rgb(1,0,0);
while(WiFi.status() != WL_CONNECTED){
delay(500);
}
rgb(0,1,0);
}
void loop() {
delay(10); // this speeds up the simulation
}
void rgb(bool red, bool green, bool blue) {
digitalWrite(pinRed, red);
digitalWrite(pinGreen, green);
digitalWrite(pinBlue, blue);
}