Hello everyone,
I'm currently building a dashboard for Simracing Rigs with the help of some online source code and adjusting/adding more functions to my liking.
Now an issue came up when I switched from an Arduino Uno to a Micro Pro.
typedef enum {
RPM,
RPM_TICK,
SPEED,
GEAR,
TYRE_STATUS,
TYRE_TEMP,
TIME,
INIT,
FUEL,
LAP,
CURRENT_TIME,
FUEL_TICK,
CURRENT_POSITION,
PERFORMANCE_METER,
} MessageType;
The code above compiles perfectly fine on the Uno and also works in conjunction with the rest.
However, since I try to move the project to the smaller Micro Pro, i get these error messages:
- error: expected identifier before numeric constant
- SPEED,
- ^
- error: expected '}' before numeric constant
- error: expected unqualified-id before numeric constant
- error: expected declaration before '}' token
- } MessageType;
- ^
Commenting the line "SPEED," resolves the issue, but leads to the problem that I cant use further methods later on in the code, since it wasn't declared above.
Now I'm wondering why this is only happening to the Micro Pro. I couldn't find any sources online relating to a SPEED constant, but maybe someone here knows.
The error also occured when I tried creating a new sketch with nothing but this
typedef enum {
SPEED,
} MessageType;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
I didn't try a different Micro Pro yet, but will do so by Tuesday.
Regards.