I forgot to mention that you can also, apparently, use the Arduino IDE to program them in the C-like language that Arduino uses.
(never tried it though)
Here is one way of getting time using the NODEMCU OS and Lua code...
![]()
I forgot to mention that you can also, apparently, use the Arduino IDE to program them in the C-like language that Arduino uses.
(never tried it though)
Here is one way of getting time using the NODEMCU OS and Lua code...
![]()
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Thanks for the extra code. I can go a fair way with just getting the time
and talking serial.
These old Amiga computers, their RTC batteries leaked,
and some leaky batteries damage the RTC as well,
but the system clock still works when the computer is running.
So just a simple thing like telling the computer the time and date
at bootup is very practical.
Hey Art,
I've been reading quite a bit over at esp8266basic.com and I am actually quite impressed!
I think I am going to give BASIC a try on my esp8266 module.
The command documentation seems to be a bit behind so check out the forum and read the "NEWS" topic as he has announced a couple of new commands there. And ongoing development seems to be quite active.
You now can read an ds18b20 temp sensor ("temp" command). Write to an I2C OLED display, etc.
Fun Stuff!
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
NiceI’ll check it out!
Mine have arrived, but now thinking I might as well buy the unit with the supply and USB-serial converter on board
like the unit in the video. Then use the bare ones I have when it comes to use in a project.
Hi Art,
If you haven't had a chance to check out the ESPBASIC yet... well,
with this simple bit of ESPBASIC code
it will get you the date and time (not sure from where, yet (i have asked)) but it seems to be accurate.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 "Heap"
print flashfree() 'how much mem left
wait
[Exit]
end
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.
Hi Art,
Just an update on the espbasic.
They have now updated the Network Time function to allow you to specify what ever time zone you want, daylight saving on/off and you can request just the part of the time string you want to access.
http://www.esp8266basic.com/functions-timedate.html
dwight
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks