espvgax2 icon indicating copy to clipboard operation
espvgax2 copied to clipboard

Small error in Wifi.ino example

Open Martin-Laclaustra opened this issue 5 years ago • 0 comments

Congratulations! What you do in this library is really ingenious!

I think that you have a little error here:

https://github.com/smaffer/espvgax2/blob/a51c674bcd7f399f63ce357bedbb6315200650c8/examples/Wifi/Wifi.ino#L14

It should be:

  vga.setFont((uint8_t*)fnt2_arial12_data, FNT2_ARIAL12_SYMBOLS_COUNT, 

By the way, in this example you might want to consider changing:

const char* ssid = "SSID";
const char* password = "PASSWORD";

to:

#ifndef STASSID
#define STASSID "your-ssid"
#define STAPSK  "your-password"
#endif

const char* ssid = STASSID;
const char* password = STAPSK;

... which is the standard in the ESP8266 arduino core examples (it has advantages for defining the key at compile time).

Also, in the examples in general, you may want to add WiFi.mode(WIFI_OFF); in setup() to make sure that the ESP8266 does not connect automatically to the network. May be, you may also want to change the serial speed to Serial.begin(115200);, also standard in the ESP8266 arduino core examples.

Best regards!

Martin-Laclaustra avatar Dec 01 '20 20:12 Martin-Laclaustra