Brand new at this....
Copied sketch from ARDUINO COOKBOOK by Michael Margolis.
There seems to be an error in the code in recipe 2.16 on page 59.
The IDE reports the following error after compiling the sketch.
Exit status 1
'Void' does not name a type
My question:
Where does the IDE store the error messages if I click on the "save error messages"?
I would greatly appreciate any help in finding the location of the error file.
Also, I would like to advise the author about the error
The following is the sketch on pages 59 and 60.
/*
- SwitCase sketch
- example showing switch statement by switching on CHARS from the serial port
- sending the character 1 blinks the led once, sending 2 blinks the led twice
- sending + turns the led on, sending - turns the led off
- any other character prints a message to the Serial Monitor
*/
const int ledPin = 13;//the pin the LED is connected to
void setup()
{
Serial.begin(9600); //initialize serial port to send and
//receive at 9600 baud
pinMode(ledPin, OUTPUT);
}
void loop()
{
if(Serial.available()) // Check to see if at least one
//character is available
{
char ch = Serial.read();
switch(ch)
{
case '1':
blink();
break;
case '2':
blink();
blink();
break;
case '+':
digitalWrite(ledPin,HIGH);
break;
case '-':
digitalWrite(ledPin,LOW);
break;
default :
Serial.print(ch);
Serial.println((" was received but not expected");
break;
}
}
}
Void blink()
{
digitalWrite(ledPin,HIGH);
delay(500)
digitalWrite(ledPin,LOW);
delay(500);
}