I have a sketch that was built, compiled, and running in a previous version of the Arduino IDE.
It included only four header files LiquidCrystal_I2C.h, Wire.h, OneWire.h, DallasTemperature.h; but also used the dtostrf() function.
I have a new computer and installed the current IDE v1.6.9 and the sketch will no longer compile. I receive an error about dtostrf() not being declared. Which header file needs to be included with IDE v1.6.9 to allow the sketch to compile?
Four included libraries, one line of code with an error, and an error message as previously described. I hope this clarifies the problem for you, it doesn't help me at all.
Sketch uses 2,028 bytes (6%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
adwsystems:
error: 'dtostrf' was not declared in this scope
I suggest comparing your sketch to mine. Your bug is in the difference between the two.
Whandall:
I did not see a copy of the error message, only a transcript.
If you look at the tilte of the thread, the error could be the same typo in the code.
And to answer the titel question: there is no header file for a function named dtosrtf() I know of.
Good point. The title has a typo, but it isn't the only one in this thread. LOL (titel SP?)
What else of the error message is relevant? There is only one instance of the function dtostrf in the program and I copied the line the error message pointed to.
I tried including various combination of stdlib.h, stdio.h, and Arduino.h (although I have never had to include Arduino.h before). I only see one item to try, from Coding Badly. I get the same error; although J-M-L appears to be able to make it work.
Here is the full error buffer if it helps anyone.
C:\Users\anthony\Documents\Arduino\sketch_jul03a\sketch_jul03a.ino: In function 'void setup()':
sketch_jul03a:5: error: 'dtostrf' was not declared in this scope
dtostrf( PI, 10, 10, buffer );
^
exit status 1
'dtostrf' was not declared in this scope
AWOL:
Are you trying to be funny?
It's not working.
Not at all, quite serious in fact. I'm very frustrated. Something changed between the two versions of the IDE and broke my code.
I hit the POST button instead of the PREVIEW button before I could add the code. I think your response was in the five minute delay that I am subject to. (I look forward to hitting the 100 post mark and getting back to normal).