-->
Page 1 of 1

Serial header to show what sketch the ESP is flashed with.

PostPosted: Mon Dec 14, 2015 5:41 am
by Barnabybear
Hi, having various ESP's kicking around on the desk in various stages of development, I find it impossible to workout which is flashed with what.
I've decided to start using a header that is printed out over the serial monitor at power up so I can tell them apart.
Code: Select allSerial.begin(115200);
Serial.print(“Electric gate opener V2.0”);
Serial.end();

Should I use any particular format or include any other information to be more in line with any existing reports?

Re: Serial header to show what sketch the ESP is flashed wit

PostPosted: Tue Dec 15, 2015 3:44 am
by gerardwr
I use this, not as fancy as yours, but it can be placed unchanged in any sketch. It prints the filename and time of compile.
Code: Select all  Serial.print(__FILE__); Serial.print(" "); Serial.print(__DATE__); Serial.print(" "); Serial.print(__TIME__);
Output in serial is like:
Code: Select alleven.ino Dec 15 2015 09:36:40

Re: Serial header to show what sketch the ESP is flashed wit

PostPosted: Tue Dec 15, 2015 12:04 pm
by ian
@gerardwr
Love it! Why didn't I think of this?! ;)

Re: Serial header to show what sketch the ESP is flashed wit

PostPosted: Thu Dec 17, 2015 10:25 am
by gerardwr
ian wrote:Love it! Why didn't I think of this?! ;)


I didn't think of it either, but picked it up on the board here :-)

So I thought to pass it on to you.

Cheers,
Gerard.