I am trying to use #define to create a constant and define a pin, check this code
#define PIN_MICROPHONE 13;
void loop()
{
analogRead(PIN_MICROPHONE);
}
But when trying to compile, it says this error:
: In function 'void loop()':
error: expected `)' before ';' token
error: expected primary-expression before ')' token
error: expected `;' before ')' token
How can I use #define macros to define pins?
This code compiles ok
#define PIN_MICROPHONE 13;
void loop()
{
analogRead(13);
}
I am using Arduino 1.0.5
classuses).