Wooden Scroll Text Display with ESP8266
✔ Simple configuration to function as a web server or client.
✔ Automatically generates QR codes for the current web address and displays them. -> No more tedious creation of QR code images!
Useful:
I struggled a lot with the Arduino IDE and external libraries. If the project is opened again after a while, there are error messages when compiling because the core or the libraries are newer. Most of the questions I read in the YouTube comments concern exactly this problem. That's why I decided in 2018 to only work with Visual Studio Code and PlatformIO. And have never regretted it! All libraries can (but do not have to) be integrated into the project. In addition, the version of the ESP core can be fixed. Such a project can easily be compiled on other computers even years later.
In addition, any other resources such as links or data sheets can be stored in the project. It remains to be mentioned that this is a real IDE and not a better text editor.😉
Arduino sketches can also be imported. With new projects you can continue with .ino files or correctly with .h and .cpp files. Here is one (of many) good overview and how-to for VSC with PlatformIO: https://docs.platformio.org/en/latest/integration/ide/vscode.html
First of all it has to be determined whether the box should work as a web server or client.
This configuration can be made at this point in the "Wifi_Matrix_OLED.h" file. Comment out the line // or not.
C ++ #define IamTheServer // Enabled: act as web server; Disabled: act as client and needs a server
C ++ const String pathToServer = "myHoster.com/scroll"; // For QR code const char * host = "myHoster.com"; // host address const String url = "/scroll/MeinText.txt"; // Path to the txt file
All fixed texts and the animations used can be adapted directly in the program.
After the configuration has been made and the project has been loaded into the ESP, it continues as follows: Since no WiFi data has yet been saved, the ESP automatically switches to AP mode. A QR code is now displayed with which the settings for the AP are automatically adopted from the smartphone. (iOs and Android) If you are then connected to the AP "Scrollbox" and have the WiFi settings open on the smartphone, the WiFi Manager's website should open automatically. If not, enter the address 192.168.4.1 in the browser. A WLAN can now be selected here and the password entered. If the log-in is correct, the ESP connects to the WiFi and starts displaying texts.
From now on, a QR code is displayed with which you can go directly to the website of the box or the remote host. As simple as that!
If someone can use this code for their own project, I would be happy to receive a picture of the finished object. The email address is in the code.