Hi group!
I just want to show you my latest project made with PicBASIC: Wireless Wood Stove Monitor
This project will be part of a bigger project and here is a clue just for you PicBASIC community:
https://thingspeak.com/channels/20713
Hi group!
I just want to show you my latest project made with PicBASIC: Wireless Wood Stove Monitor
This project will be part of a bigger project and here is a clue just for you PicBASIC community:
https://thingspeak.com/channels/20713
Very Nice!!
Thanks for sharing.
I am definitely interested in your ThingSpeak stuff.
I have been able to get a Thingspeak servier up and running on my own raspberry pi (although I haven't done much with it)
If you want to incorporate wifi in any of your stuff I highly recommend you check out esp8266basic.com
It is extremely easy to incorporate the esp8266 into your PIC projects to provide the wifi connectivity.
If you click on over to the forum from the esp8266basic page you will find much discussion about posting data to thingspeak, getting ntp time, reading temp sensors, etc, etc.
Here is a post I did here earlier...
http://www.picbasic.co.uk/forum/showthread.php?t=20908
So if you like BASIC and want to easily incorporate wifi then definitely check out the esp8266.
thanks again and keep us posted on the thingspeak project.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
I'll try ESP8266Basic one day or another for sure! I'm already making projets with PicBASIC and ESP8266:
World’s First Internet Connected Lawnmower
http://www.picbasic.co.uk/forum/showthread.php?t=20083
Here is how I use an ESP8266 with PushingBox and ThingSpeak services
http://www.picbasic.co.uk/forum/show...ht=#post133693
Michel,
your projects are awesome!
I am working on interfacing an esp8266 to a PIC to control a nixie clock.
I have it working now and am just fine tuning and adding features.
as an example of the brilliant simplicity of using the esp8266basic...
here is the code I have running on the esp module to get ntp time and provide it to the PIC...
that is it!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() hh = mid(bla,12,2) 'hour mm = mid(bla,15,2) 'min ss = mid(bla,18,2) 'sec ' picOUT = hh & mm picOUT = picOUT & ss serialprint picOUT ' return ' [Exit] end
Now it is no where near as complete and capable as our beloved PICbasicpro but it really dosen't need to be. That is what the PIC is good for.
You can run the complex code with complete reliably and have the esp module do the wifi stuff.
And the real beauty and power of the espBASIC is that there is no complex tool chain to get it up and running. The development environment IDE is all hosted within the module itself. Once you flash the espbasic OS to the module then that is it! All the rest of code development happens in the self-hosted web page from the module.
Last edited by Heckler; - 10th February 2016 at 05:04.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
OK you got me! Is it possible to do the thingspeak thing on the ESP and having a PIC do the heavy stuff and pushing the results to the ESP via the serial port? To be clear, does ESPBasic handle serial data IN easily?
I'll give it a try with PushingBox. Having a standalone ESP board pushing notifications is very very very interesting...
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
and the ESB8266-01 codeCode:'============================================================= ' 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
There is a bit of a learning curve so do some reading on the espbasic forum.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
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
Last edited by Heckler; - 12th February 2016 at 15:54.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
NOTE:
In the sample PIC code above, to get the time from the esp module I made a mistake.
you need to replace the first serin2 line with this one...
The rest of the posted code above should work with this exception.
Code:SERIN2 rxe,86,3000,SerTmout,[WAIT(">"),WAIT(13),WAIT(10)] 'wait for ">" "CR" "LF"
Last edited by Heckler; - 13th February 2016 at 01:09.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks