problem compiling example code | ESP8266 Wi-Fi Module | 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
problem compiling example code
No permission to create posts
February 8, 2018
6:01 pm
Avatar
mtmtntop
New Member
Members
Forum Posts: 3
Member Since:
February 8, 2018
sp_UserOfflineSmall Offline

 Hi.  I was using this code from the examples:

https://www.mathworks.com/help/thingspeak/read-and-post-temperature-data.html

to do a simple 1820 temp read and post.  When i copied and pasted into arduino and tried to compile, I get this error:

Arduino: 1.8.5 (Windows 8.1), Board: "SparkFun ESP8266 Thing Dev, 80 MHz, 512K (no SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 115200"

D:\arduino sketches backup\sketch_feb08c\sketch_feb08c.ino: In function 'void loop()':

sketch_feb08c:58: error: 'write2TSData' was not declared in this scope

write2TSData( channelID , dataFieldOne , celsiusTemperature , dataFieldTwo , fahrenheitTemperature , dataFieldThree , millis() ); // Write the temperature in F, C, and time since starting.

^

exit status 1
'write2TSData' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I'm not very experienced at writing this code so I would appreciate any help.  thanks

February 9, 2018
10:36 am
Avatar
cstapels
Moderator
Members


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

 Your compiler cannot find the function write2TSData().  Make sure you copied it, its down at the bottom.  If its there and the compiler still cannot find it, this is most likely due to a missing open or close brace: '{' or '}' .

 I checked out the code on the site and there doesn't seem to be a missing brace there. (both the full version and the step by step code compiles as copied for me)  You should go through carefully and make sure each open brace has a corresponding close brace, or you could recopy the code (remembering to adjust the constants at the top.)

If you copied form the section where each bit of code is explained separately, it would be very easy to miss a close brace.

Let us know how it goes.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
20 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:

terranceqh2, DianeEmids, Alanawaype, uqovitay, ufijifode, manish01

Administrators: Hans: 387, lee: 457