Hi guys,
I dont have much experience with my new arduino. For a school project i am supposed to connect an Input (Piezo) and an ouput (Piezo). I got them to work seprately but now i am trying to connect them through the if else statement. In the attachment you can see what i already made. It is not working though.
My idea:
If the pressure of the input is above 100, the output Piezo will make a sound.
I hope you guys can help me out!
Thank you!
Error that my arduino gives:
Arduino: 1.6.12 Hourly Build 2016/09/02 02:26 (Mac OS X), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"
/Users/sasa/Documents/Arduino/Piezo_input_output_verbinden/Piezo_input_output_verbinden.ino: In function 'void loop()':
Piezo_input_output_verbinden:12: error: expected identifier before numeric constant
if (Serial.begin > [100]) // https://www.arduino.cc/en/Reference/Else
^
/Users/sasa/Documents/Arduino/Piezo_input_output_verbinden/Piezo_input_output_verbinden.ino: In lambda function:
Piezo_input_output_verbinden:12: error: expected '{' before ')' token
if (Serial.begin > [100]) // https://www.arduino.cc/en/Reference/Else
^
/Users/sasa/Documents/Arduino/Piezo_input_output_verbinden/Piezo_input_output_verbinden.ino: In function 'void loop()':
Piezo_input_output_verbinden:12: error: no match for 'operator>' (operand types are '' and 'loop()::__lambda0')
if (Serial.begin > [100]) // https://www.arduino.cc/en/Reference/Else
^
exit status 1
expected identifier before numeric constant
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.