TFT WIFI setup screen

56 views
Skip to first unread message

PrecisionClays

unread,
Feb 5, 2021, 12:28:46 PM2/5/21
to Annex WiFi RDS
I hadn't contributed anything for a while so I thought I'd share a snippet of code when using a TFT display.  If the device needs to connect to WIFI but can't connect, this code will display setup info on the TFT at startup.  You must have already initiated the TFT device before this executes:

if left$(IP$,11) = "192.168.4.1" then
  TFT
.FILL 0
  TFT
.TEXT.POS 0,15
  TFT
.PRINT "---- SETUP ---- "
  TFT
.PRINT " "
  TFT
.PRINT "Connect WIFI SSID to:"
  TFT
.PRINT "ESP"+MAC$
  TFT
.PRINT " "
  TFT
.PRINT "Browse to 192.168.4.1"
  TFT
.PRINT "Goto Config tab"
  TFT
.PRINT " "
  TFT
.PRINT "Enter your WIFI"
  TFT
.PRINT "SSID and Password"
  TFT
.PRINT "Save and Restart"
  pause
60000
endif

It shows the SSID that should be connected to.
Reply all
Reply to author
Forward
0 new messages