Hey all-
I have similar code that I have running on multiple esp’s in a few different rooms (agriculture related) but every time I make an update, I have to go through and change my tokens (among a few other items). It would be nice to just change one variable at the top of my code (in this case, the room number) and upload. I’m trying to do something like:
int roomNumber = 2
char auth[] = “authCode”
//room 1 token
rm1token = “12312f23234”
//room 2 token
rm2token = “123123ljksdfj”
void setup() {
Switch(roomNumber) {
case 1:
authCode = rm1token;
case 2:
authCode = rm2token;
Blynk.begin(auth, ssid, pass, “x.x.x.x”);
}
Any thoughts? And I’m always up for a simpler solution (perhaps some python script to upload code )