Send data from ThingSpeak to ESP8266 | ThingSpeak Projects | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Send data from ThingSpeak to ESP8266
Avatar
irproject

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
1
April 29, 2017 - 5:29 pm
sp_Permalink sp_Print

Hi

I succeeded send data from a sensor (by Arduino Uno + esp8266) to my ThingSpeak channel.

Now I want to send back data from my channel to Arduino Uno.

Help?  tnx

Avatar
rw950431

Forum Posts: 252
sp_UserOfflineSmall Offline
2
May 1, 2017 - 6:29 am
sp_Permalink sp_Print

What exactly do you want to send back from thingspeak?   If you want to retrieve data points from a channel you can just use the read functions provided by the library you used to make  your write request.

 

If you want to send commands check out the talkback app.

Avatar
irproject

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
3
May 3, 2017 - 1:09 pm
sp_Permalink sp_Print

I want for exapmle turn on LED from the Arduino If a channel value meets a certain condition

Avatar
cstapels

Gold
Forum Posts: 126
sp_UserOfflineSmall Offline
4
May 4, 2017 - 2:35 pm
sp_Permalink sp_Print

You can definitely use the talkback app.  Set your Arduino to occasionally poll for new commands using the documentation for "Execute the Next TalkBack Command" from here: https://www.mathworks.com/help/thingspeak/talkback-app.html .

You can use the react app to watch your channel and see if the condition changes: https://www.mathworks.com/help/thingspeak/react-app.html

Use the react to trigger a ThingHTTP that writes a command to your talkback que.  You can create multiple ThingHTTP for each command and have each triggered by a different react condition. https://www.mathworks.com/help/thingspeak/thinghttp-app.html

Given the power in the Arduino, I would suggest an easier method may be to read the value directly from your thingspeak channel and make a decision about what to do on the arduino (i.e. if value=xx, then LED =ON...etc.)  You can poll your channel values any time you like.  The ESP82266 also has enough on board memory to analyze the data read from a channel.

Avatar
irproject

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
5
May 5, 2017 - 3:40 am
sp_Permalink sp_Print

About the second option you suggested, how can I make the Arduino read the value directly from thingspeak channel?

I mean:

for sending data from Arduino by esp8266 I use these AT commends:

AT+CIPSTART= TCP , 184.106.153.149, 80;

mystring = "GET https://api.thingspeak.com/update?api_key=**********&field1=0"

AT+CIPSEND=...;

AT+CIPCLOSE

what commends do I need for making the Arduino read the data? 

Avatar
rw950431

Forum Posts: 252
sp_UserOfflineSmall Offline
6
May 6, 2017 - 8:41 am
sp_Permalink sp_Print

You use the same AT commands but a different URL

Please see the documentation at https://au.mathworks.com/help/thingspeak/get-channel-field-feed.html to construct a URL to read data. If you want to read more than a single value please see https://au.mathworks.com/help/thingspeak/get-a-channel-feed.html

Avatar
irproject

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
7
May 7, 2017 - 3:33 pm
sp_Permalink sp_Print

Thank you very much! 

You helped me a lot.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

winnieeq69

AutoCheernpen

Bostermet

engladNed

iivenul

olewaeayafaku

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee