Skip to content

How to have ESPWebServer.py report messages to onboard display #3

@CyberSpiderPrime

Description

@CyberSpiderPrime

I am fairly new to MicroPython/Python but have been programming in several languages for years.

Device:
Lilygo ESP32 TTGO with T-Display (on-board display)

firmware with ST7789 driver(s)
https://github.com/russhughes/st7789_mpy
(MicroPython v1.18-128-g2ea21abae-dirty on 2022-02-12; TTGO T-Display with ESP32)
ST7789 config file for T-Display
https://github.com/russhughes/st7789_mpy/tree/master/examples/configs/tdisplay_esp32

webserver software (from here)
https://github.com/codemee/ESPWebServer

my copy of TestWebServer.py is modified to work in AP (private network) mode and to use the on-board display to display IP address. I would like this to also handle messages from ESPWebServer.py.

Currently, ESPWebServer.py is unmodified in regards to its reporting (serial monitor, print()). This, of course, requires you to have another device connected to see the messages (computer, smartphone with usb serial software, etc.). This is fine for testing, not so much for stand alone operation.

How would I get ESPWebServer.py to notify its importer (TestWebServer.py in this case) that A) it has a message, B) type (general/error/etc.) and C) the message's content so that the importer could process the message (example: "ERROR" and "file $name$ not found"; "General" and "file $name$ found"; "Status", "GPIO## is set HIGH")?

Option: can ESPWebServer.py be written/rewritten to be a standalone program (ESPWebServer-Standalone.py?, no need for TestWebServer.py), therefore handling all reporting requests itself (with print() at first then I could add my modifications to that)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions