'================================================= ==========

'--- This is the code running on the ESP8266-01 module ---

'================================================= ==========

'''memclear

'''cls

'''timesetup(-7,0)

'''baudrate 9600

'''serialtimeout 2000

'''delay 1000

'''button "Exit" [Exit]

'''timer 100 [PicSer]

'''wait

''''

'''[PicSer]

'''serialflush

'''input picin

'''picin = mid(picin,1,5)

'''if picin == "Time?" then gosub [gettime]

'''wait

''''

'''[gettime]

'''bla = time()

'''dy = mid(bla,1,3) 'dow

'''mh = mid(bla,5,3) 'month

'''dd = mid(bla,9,2) 'date

'''hh = mid(bla,12,2) 'hour

'''mm = mid(bla,15,2) 'min

'''ss = mid(bla,18,2) 'sec

'''yr = mid(bla,21,4) 'year

''''

'''if dy == "Sun" then dow = "1/"

'''if dy == "Mon" then dow = "2/"

'''if dy == "Tue" then dow = "3/"

'''if dy == "Wed" then dow = "4/"

'''if dy == "Thu" then dow = "5/"

'''if dy == "Fri" then dow = "6/"

'''if dy == "Sat" then dow = "7/"

''''

'''if mh == "Jan" then mth = "01/"

'''if mh == "Feb" then mth = "02/"

'''if mh == "Mar" then mth = "03/"

'''if mh == "Apr" then mth = "04/"

'''if mh == "May" then mth = "05/"

'''if mh == "Jun" then mth = "06/"

'''if mh == "Jul" then mth = "07/"

'''if mh == "Aug" then mth = "08/"

'''if mh == "Sep" then mth = "09/"

'''if mh == "Oct" then mth = "10/"

'''if mh == "Nov" then mth = "11/"

'''if mh == "Dec" then mth = "12/"

''''

'''picout = dow & mth

'''picout = picout & dd

'''picout = picout & "/"

'''picout = picout & hh

'''picout = picout & mm

'''picout = picout & ss

''''

'''serialprintln picout

'''return

''''

'''[Exit]

'''end

## Bookmarks