Re: Serial WiFi module
Hi Art,
If you haven't had a chance to check out the ESPBASIC yet... well,
with this simple bit of ESPBASIC code
memclear
cls
button "GetTime" [GetTime]
button "Exit " [Exit]
wait
[GetTime]
print time()
bla = time()
dw = mid(bla,1,3) 'dow
mh = mid(bla,5,3) 'month
dt = 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
print dw
print mh
print dt
print hh
print mm
print ss
print yr
print
print "Heap"
print flashfree() 'how much mem left
wait
[Exit]
end
it will get you the date and time (not sure from where, yet (i have asked)) but it seems to be accurate.
It will spit it out both on a webpage and to the serial port of the ESP module at 9600 baud.
you can modify the espbasic code and use "serialprint" instead of "print" if you just want it to go to the serial port.
it really helps to start a terminal window and connect it to the usb serial port for your module when running the basic as there is a lot of feedback sent to the serial port as well as what ever web page the module sets up.
It should be no problem at all to have your PICBASIC code receive the serial data from the esp module and act on it.
you don't really have to use the web page features of espbasic if you don't want to (other than to get your code into the module and truoble shoot and test it. then depending on how you write your code the module will just interact with your PIC as you desire via the serial port of the module.
I have found the ESPBASIC to truly be easy to learn and interact with because of the unique fact that all your development is via a webpage served up by the module itself.
you can connect to the module acting as an access point or have the module connect to your home wifi and access it's ip address.
it will tell you what ip it gets from your home network via the serial port output as it boots up, so connect up a terminal program to view it.
give it a go and ask questions or send me a pm if you need more help.
Last edited by Heckler; - 30th November 2015 at 05:14.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks