If you communicate with the esp over serial @9600 you can use the input command to prompt the PIC for information.
Input is in the form of
input "TEMPATURE" temp
cls
wprint "Temperature is"
wprint temp
wait
The device will spit the following out the serial port.
TEMPATURE
>
If the pic responds with text or a value followed by a new line character the value or text will be placed in to the temp variable.
Keep in mind that the input command is blocking and the esp will only return a web page once it has hit the wait command.
All variables can be used for numbers or strings. To ad strings you should use the & symbol in stead of the +.
The mid function and len functions are implemented. Left and right are not as of yet.
Spaces are used by the parser to break the code up in to smaller chunks to be used by the interpreter. This is why you can only have one operation for math.
bla = 5 + 5 will work and return 10
bla = 5 + 5 + 5 will return 10 because it only acts on the 2 things.
Check out the language reference
http://www.esp8266basic.com/language-reference.html
for list of functions and commands.
xtal wrote:I have a 16F1825 PIC capturing ppm counts and getting pool temperature and in the future getting PH.
Then send this data over serial port to the esp and update several vars in the esp which will get sent on the next web page refresh to update the web page and display the new updated values. Commands can be sent from web page to PIC
to display additional data...
Using NodeMCU I run out of memory. Have some ESP-13 ordered which are susposed to have more ram...
NodeMCU also uses serial port for logging and does not have any way to stop it which causes problems...
Will your basic include string vars A$, b$ etc and String functions Len, mid$ ,instr, left$, right$ etc. ?
this would be a big +,,,, Is there any reason you use Let A = x verses A=x ????
http://esp8266basic.com
A BASIC interpreter for your ESP
Working now on Autodrop3d. A 3d printer with automatic part ejection system. https://autodrop3d.com