PRODUCT_ID(XXX);
PRODUCT_VERSION(0);
setup()
loop()
When I try adding the ID and version. I get compile errors. Im working on the P1 with version 0.4.4.
Any thoughts what I’m doing wrong?
Thanks,
PRODUCT_ID(XXX);
PRODUCT_VERSION(0);
setup()
loop()
When I try adding the ID and version. I get compile errors. Im working on the P1 with version 0.4.4.
Any thoughts what I’m doing wrong?
Thanks,
Try to be less “simplistical”
PRODUCT_ID(123);
PRODUCT_VERSION(0);
void setup() { }
void loop() { }
This should compile just fine
BTW: Quoting your compiler errors might be good too. It helps others to spot the error, but it also might give you a hint to solve the riddle yourself
@ScruffR, I realized you didnt have much to look at.
Below are the compiles error when compiled from the Web IDE for a P1.
<command-line>:0:12: error: expected unqualified-id before numeric constant
v3.0_active.cpp:3:1: note: in expansion of macro 'PRODUCT_ID'
PRODUCT_ID(139);
^
v3.0_active.cpp:4:16: error: expected constructor, destructor, or type conversion before '(' token
PRODUCT_VERSION(0);
^
1st few lines of code:
Since I have no P1 to build against and seem to have no problem building against my Photons, could you try to build against a Photon and see if you still get the same error(s)?
Maybe a few more lines of your code (especially setup()
and loop()
) would be good too.
Alternatively could you whip up some minimal sketch that produces this error and post it in its entirety?
Try to put all your #include
directives before the PRODUCT_*
makros.
This fails
PRODUCT_ID(123);
PRODUCT_VERSION(0);
#include "application.h"
void setup() { }
void loop() { }
while this builds
#include "application.h"
PRODUCT_ID(123);
PRODUCT_VERSION(0);
void setup() { }
void loop() { }
Well, that was easy! Didn’t even think to try that.
Thanks working now.