What I'm doing wrong or why is it not working:
#define Uin A0;
void setup() {
}
void loop() {
analogRead(Uin);
}
Results in a Error (expected ')' before ; token.
I thought #define just exists as a place holder.
What I'm doing wrong or why is it not working:
#define Uin A0;
void setup() {
}
void loop() {
analogRead(Uin);
}
Results in a Error (expected ')' before ; token.
I thought #define just exists as a place holder.
Because you have a ; at the end of your #define.
#define Uin A0;
analogRead(Uin);
becomes:
analogRead(A0;);
The Arduino website mentions this in their reference. For more in-depth detail about the C pre-processor you can read the (rather large) manual here.
Could you please link to the reference. (It is also answered there - I'm sorry) [In 5 min I can accept the answer]
link
– TimK May 15 '17 at 12:38