Send data from ThingSpeak to ESP8266 | ThingSpeak Projects | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





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

sp_Feed sp_TopicIcon
Send data from ThingSpeak to ESP8266
No permission to create posts
April 29, 2017
5:29 pm
Avatar
irproject

Silver
Members
Forum Posts: 8
Member Since:
April 6, 2017
sp_UserOfflineSmall Offline

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

May 1, 2017
6:29 am
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

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.

May 3, 2017
1:09 pm
Avatar
irproject

Silver
Members
Forum Posts: 8
Member Since:
April 6, 2017
sp_UserOfflineSmall Offline

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

May 4, 2017
2:35 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 210
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

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.

May 5, 2017
3:40 am
Avatar
irproject

Silver
Members
Forum Posts: 8
Member Since:
April 6, 2017
sp_UserOfflineSmall Offline

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? 

May 6, 2017
8:41 am
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

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

May 7, 2017
3:33 pm
Avatar
irproject

Silver
Members
Forum Posts: 8
Member Since:
April 6, 2017
sp_UserOfflineSmall Offline

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: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

celinabw2, FitoSprayscroma, LunnonGor, lancevl16, bernicenk60, veronicadq18

Administrators: Hans: 387, lee: 457