Skip to content

Instantly share code, notes, and snippets.

@netmaniac
Created February 25, 2016 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netmaniac/cbff2b5e6476f52a9d7c to your computer and use it in GitHub Desktop.
Save netmaniac/cbff2b5e6476f52a9d7c to your computer and use it in GitHub Desktop.
Problem with error 'void value not ignored as it ought to be' in Arduino IDE 1.6.7
/home/viciu/akd-sketchbook/not_ignored_void/tab2.ino: In function 'void setup()':
tab2:3: error: void value not ignored as it ought to be
Serial.println("2+2=4");
^
exit status 1
void value not ignored as it ought to be
void setup() {
Serial.begin(9600);
int val = add_two();
Serial.println(val);
}
void loop() {
}
void add_two() {
Serial.println("2+2=4");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment