problem compiling example code | ESP Wi-Fi | Forum


Please consider registering

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
New Member
Forum Posts: 3
Member Since:
February 8, 2018
sp_UserOfflineSmall Offline

 Hi.  I was using this code from the examples:

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

Forum Posts: 727
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: 166

Currently Online:
30 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

faaramin, swarnak32, SaiHarish.M, vikas, abhisheksharma, khoshghadam

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457