ESP8266 FIRMWARE RTC SERIAL
}This is an Arduino variant, I believe you should find apart from connect.wifi() status little difficulty in converting it PICAXE basic, all comms to the ESP8266 are straightforward serial commands e.g. Open serial communications and wait for port to open:ĭbgSerial.begin(9600) //can't be faster than 19200 for softserialĭbgSerial.println("Module have no response.") ĭbgSerial.println("OK, Connected to WiFi.") ĭbgSerial.println("Can not connect to the WiFi.") SoftwareSerial dbgSerial(10, 11) // RX, TX so, in case anyone is interested in the ESP with Lua here are some links,įor development, I use Lua Loader and a PC console TCP client for testing networking: The disadvantage is that you need to learnĪ bit of Lua. Host MCU and also has a file system for storing scripts. It has the further advantage of off loading much of the grunt processing from the I am using the Lua firmware because it offers so much more than the AT command set and is I did a forum search for the ESP8266, but didn't find much except for manuka's post, Lock you out if you try to query it more frequently than every 5 sec so, not exactly a RTC clock, but close.Īlso, the extraneous print statements and comments should probably be removed from the scripts. So, you send the command and the ESP will respond via the print statement.
The daytime script is executed by issuing theĬommand: dofile("a") which will return the date/time string, for example, 16:44:07. Soft restart and will obtain an IPaddress. a will automatically run on a powercycle or OTM - on-time marker : * (time correct on arival)Ĭonn:on("receive", function(conn, payload)Ĭonn:on("disconnection", function(conn, payload) print('\nDisconnected') end)Ĭonn:connect(13,'') - DayTime protocol sends immediately on connectYou communicate with the ESP via a serial port.
ESP8266 FIRMWARE RTC CODE
UTC(NIST) - the originator of this time code msADV - time code advanced in ms for network delays H - Health of the server (0: healthy, >0: errors) L - Leap second at the end of the month (0: no, 1: +1, 2: -1) TT - USA is on Standard Time (ST) or (DST) : 00 (ST) JJJJJ - the modified Julian Date ( MJD is the Julian Date minus 2400000.5)
JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) OTM. Queries NIST DayTime server for a date time string here SSID and PassWord should be modified according your wireless router