Hi Michel,
here is a link to the command reference for thingspeak...
http://www.esp8266basic.com/function...speak-api.html
and a link to the espbasic command reference...
http://www.esp8266basic.com/language-reference.html
you will likely want to hop over the the forum (link at the top of his page) and do some looking there as the command reference is really lacking in example code. The command reference is also not very well organized and it can be hit or miss to find the command you are looking for.
there is some example code for posting to thingspeak here...
http://www.esp8266.com/viewtopic.php?f=40&t=6732
and here is the code I am using that allows my PIC to request time from the esp module via serial at 9600 baud.
PIC CODE
Code:
'=============================================================
' Get TIME from ESP8266-01 NTP Time Server
'=============================================================
SerTmout: ' just blinks an led and tries again
led=0
pause 200
led=1
pause 200
led=0
pause 200
led=1
pause 200
GetTime:
txe=1 'high the serial output pin, needs to start high
pause 100
serin2 rxe,espbaud,3000,SerTmout,[wait(">"),SKIP 2] 'wait for esp to send ">,CR,LF"
serout2 txe,84,["Time?"] 'ask for time by sending "Time?"
serin2 rxe,84,3000,SerTmout,[dec2 hh,dec2 mm, dec2 ss] 'read back hh,mm,ss
Return
and the ESB8266-01 code
Code:
memclear
cls
timesetup(-7,0)
baudrate 9600
serialtimeout 2000
delay 1000
button "Exit " [Exit]
[Main]
timer 100 [PicSer]
wait
'
[PicSer]
serialflush
input picIN
picIN = mid(picIN,1,5)
if picIN == "Time?" then gosub [gettime]
wait
'
[gettime]
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
'
picOUT = hh & mm
picOUT = picOUT & ss
serialprintln picOUT
'
return
'
[Exit]
end
There is a bit of a learning curve so do some reading on the espbasic forum.
Note: the esp forum is a large forum the covers many other languages that can be run on the esp8266
but when you click the link from Mike's www.esp8266basic.com website it takes you to a subsection of the forum just devoted to his espbasic.
and finally here is a link to a sample project I did that reads 3 ds18b20 onewire temp sensors
http://www.esp8266.com/viewtopic.php?f=41&t=7319
But I think I would keep the temperature sensor work on the PIC side.
good luck
Bookmarks