[Answered]- Access product version?

Is there anyway to read back the version you set when using the console product system ?
ie. “PRODUCT_VERSION(4);”

I would like to use the version is a function later in the program for serial communication, ofcause I could just make a define and use that both places if we cant read the product_version back.

The variable Uint16 __system_product_version seems to work:

PRODUCT_ID(1319);
PRODUCT_VERSION(2)

void setup() {
    Serial.begin(9600);
    
    delay(8000);
    Serial.printlnf("%d", __system_product_version);
}

I tested operation with 0.5.3, I also made sure it compiles in 0.4.9 and 0.6.0rc2.

2 Likes

Perfect, thanks :slight_smile:

Read {"CMD":"VER"}
Reply {"CMD":"VER", "VER":"4"}

JSON formatted serial data … becuase we can :sunglasses:

1 Like