Here is how I use an ESP8266 with PushingBox and ThingSpeak services


+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67

    Default Here is how I use an ESP8266 with PushingBox and ThingSpeak services

    Hi group!


    Here is how I use an ESP8266 with PBP. In the attached example I show you how to use PushingBox and ThingSpeak services. I'm sorry it's not a full working project.
    This example suppose you know how to use Darrel's DT_INTS-18.

    I'm using a PIC18F25K22 @64MHz. A clock that fast may not be required, it's yours to test it out! You must use a PIC18 because a big receiving buffer is required. It's a matter of memory banks.
    There a lot of hserout2 for debugging purposes. There is no handling of any HTTP response, sorry!


    Watch out: The ESP8266 works @3V. You need a level shifter on the RX & reset pins of the ESP, a resistor divider is enough. The TX of the ESP can drive the RX on the PIC without level shifting.


    This is how to push data to ThingSpeak (here 3 fields with values 5, 255 & 300):


    Code:
    GET /update?key={my_API_key}&field1=5&field2=255&field3=300&headers=false HTTP/1.1{CrLf}Host: api.thingspeak.com{CrLf}Connection: close{CrLf}Accept: */*{CrLf}{CrLf}
    • Replace {CrLf} by CrLf ( 13, 10 )
    • Replace {my_API_key} with your API key
    • The keyword "headers=false" will remove extra headers from response.
    • The keyword "Connection: close" will close the connection automatically.
    See ThingSpeak doc for more. Note: ThingSpeak is limitted to one call every 15 seconds max.


    PushingBox is nice to push to several services (email, Twitter) in a single call. Note: strings must be URL encoded. Here is an online tool: http://meyerweb.com/eric/tools/dencoder/
    For my lawn mower project I'm using an external I2C EEPROM to store my URL encoded tweets. The data is URL encoded and dumped using VB.NET:


    Code:
    Dim UrlEncoded As String = System.Web.HttpUtility.UrlEncode(MyString)
    Debug.WriteLine(UrlEncoded)


    Without Darrel's work a LOT of projects wouldn't exists. Thank you and RIP Darrel...


    IOT_Demo.pbp.txt
    ESP8266_Base.pbp.txt

  2. #2
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67

    Default Re: Here is how I use an ESP8266 with PushingBox and ThingSpeak services

    I forgot to mention: this code works with AT firmware v0.22 & up.


    AT_v0.22 is the highest you can flash on your module if it has only 512kB. Don't worry, there is something you can do.

Similar Threads

  1. PCB Layout Services
    By jmgelba in forum Adverts
    Replies: 10
    Last Post: - 4th July 2017, 15:09
  2. seo services
    By shawnii33 in forum Off Topic
    Replies: 1
    Last Post: - 21st November 2012, 17:00
  3. seo services
    By shawnii33 in forum General
    Replies: 1
    Last Post: - 21st November 2012, 17:00

Posting Permissions

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