int freq = 100;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
// initialize digital pin LED_BUILTIN as an output.
pinMode(14, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
// blink my Light
// and get a new value back at the same line
freq = blink_light(freq);
Serial.println(freq);
}
int blink_light(int delay_time){
digitalWrite(14, HIGH); // turn the LED on (HIGH is the voltage level)
delay(delay_time); // wait for a second
digitalWrite(14, LOW); // turn the LED off by making the voltage LOW
delay(delay_time); // wait for a second
return delay_time + 10;
}