Hello, I’m new, my code doesn’t compile.
If someone could help me, I’d be very grateful.
I’m trying to do a counter, but when you’re compiling an error occurs, a comma is missing, but I can’t see where, I’ve checked it several times and I definitely don’t see it.
What’s wrong?
This is the code:
#define RED #define GREEN
int x = 0; #define button
Hello again, I changed what @lastchancename said and in that respect it works better, but it keeps giving me the same error:
expected primary-expression before ‘,’ token
but I can’t see where.
You don’t define any values for RED or GREEN, so when the compiler tries to replace them in the code, you end up with lines like
pinMode( , OUTPUT):
// and
digitalWrite( , HIGH);
Hence the complaint about there being something missing before the comma. Your first two lines of code need values after the key words as @JCA34F said above. ETA and the fourth line, where you define what pin the button is connected to.