Strings in Arduino IDE | Arduino | 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
Strings in Arduino IDE
No permission to create posts
December 13, 2016
6:23 pm
Avatar
mohamedali1993
Bethesda, MD
New Member
Members
Forum Posts: 4
Member Since:
December 13, 2016
sp_UserOfflineSmall Offline

Hello,

From what I am seeing in the online documentation, we can write integers in the Arduino IDE using ThingSpeak.setField then ThingsSpeak.writeFields(), but can we write strings? Can we send data that doesn't need to be graphed?

 

Thank you,

Mo

December 14, 2016
6:49 am
Avatar
Rob Purser
Natick, MA

MathWorks
Members
Forum Posts: 46
Member Since:
August 22, 2015
sp_UserOfflineSmall Offline

Hi Mo,

Yes -- both setField and writeField accept both const char * and arduino String types.

See line 585 in ThingSpeak.h to see an example function signature.

ThingSpeak won't plot them (obviously), and you'll need to make sure to use the 'OutputFormat' of 'timetable' when you're working in MATLAB.

-Rob

Senior Development Manager for IoT and Hardware Interfacing for MATLAB at MathWorks.  Visit ThingSpeak.com to explore the IoT Analytic platform that speaks MATLAB made for engineers and scientists.  You can collect, analyze, and act in 5 minutes or less!

December 29, 2016
1:57 pm
Avatar
mohamedali1993
Bethesda, MD
New Member
Members
Forum Posts: 4
Member Since:
December 13, 2016
sp_UserOfflineSmall Offline

Hey Rob,

 

Thank you for your response. I am now able to send strings and read it in Matlab using timetable output format in the thingSpeakRead function, but I am unable to view the same data table in the actual channel. I have tried to use thingSpeakWrite function to write the table to another channel, but that didn't work. If I treat the table as an array and index through it, then write it to another channel, it still views it as a graph. Finally, I tried the plugin app to create a "chart with multiple series", and still got a graph.

 

Is there anyway I can create a table with multiple strings, and be able to view it in a table format on my Thing Speak channel?

 

Thanks again,

Mo

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:

MiguelWap, JamesdinnA, ScottTug, ThomasApesy, RicardoVeque, AlbertRop

Administrators: Hans: 387, lee: 457