I was practicing sketched. I have the following problem
The Program does not execute the functions no error while compiling. Can anybody give me the solutions
The following standard blink LED was taken
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
The above standard sketch working fine with LED blinking seen
Now to practice I have modified as follows
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(9600);
Serial.println(" In Blink Sketch");
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
void SetLedHigh();
// digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
void SetLedLow();
// digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
void SetLedHigh()
{
Serial.println("LED is set ON");
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
}
void SetLedLow()
{
Serial.println("LED is set OFF");
digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level)
}
From the above sketch no compilation errors are seen and LED does not blink. I think it is skipping the function. can any body solve my problem