A Wireless Wood Stove Monitor on Hackaday


Results 1 to 7 of 7

Threaded View

  1. #6
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    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
    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.

Similar Threads

  1. More wood chuck lighting questions
    By AvionicsMaster1 in forum General
    Replies: 17
    Last Post: - 22nd January 2012, 04:45
  2. How many LEDs could a wood chuck light
    By AvionicsMaster1 in forum Schematics
    Replies: 5
    Last Post: - 18th December 2010, 06:35
  3. AC main monitor
    By tallen in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th August 2009, 16:23
  4. Baby Monitor
    By inoonan in forum Serial
    Replies: 2
    Last Post: - 14th September 2006, 22:54
  5. Car monitor
    By Christopher4187 in forum General
    Replies: 2
    Last Post: - 27th March 2006, 18:13

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts