//program 4nov22 - AI dan AO
// the number of the LED pin
const int ledPin = 23; // 16 corresponds to GPIO16
// setting PWM properties
const int freq = 5000;
const int ledChannel = 0;
const int resolution = 8;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// configure LED PWM functionalitites
ledcSetup(ledChannel, freq, resolution);
// attach the channel to the GPIO to be controlled
ledcAttachPin(ledPin, ledChannel);
}
void loop() {
// put your main code here, to run repeatedly:
ledcWrite(ledChannel, 5);
delay(10); // this speeds up the simulation
}