sparkfun / phant-arduino

phant logging utility library for arduino
Other
51 stars 19 forks source link

Error compiling on MKR1000 #7

Closed svenvdvoort closed 6 years ago

svenvdvoort commented 8 years ago

When i try to compile my sketch for my Genuino MKR1000 (hackster edition), i get the following error:

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:27:22: fatal error: pgmspace.h: No such file or directory

 #include "pgmspace.h"

                      ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino MKR1000.

When I try to compile on the Arduino Uno settings, it works fine. But I don't have an Uno...

After copying the pgmspace.h file to the C:***\arduino-1.6.8\libraries\phant-arduino-master\src folder the error changed to:

Arduino: 1.6.8 (Windows 7), Board:"Arduino/Genuino MKR1000"

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(String, double)':

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:152:26: error: 'dtostrf' was not declared in this scope

   dtostrf(data, 1, 4, tmp);

                          ^

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(const __FlashStringHelper*, double)':

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:162:26: error: 'dtostrf' was not declared in this scope

   dtostrf(data, 1, 4, tmp);

                          ^

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(String, float)':

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:174:26: error: 'dtostrf' was not declared in this scope

   dtostrf(data, 1, 4, tmp);

                          ^

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(const __FlashStringHelper*, float)':

C:\Users\***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:184:26: error: 'dtostrf' was not declared in this scope

   dtostrf(data, 1, 4, tmp);

                          ^

exit status 1
Error compiling for board Arduino/Genuino MKR1000.

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

I hope anyone can help me!

puckettgw commented 8 years ago

I think you may need to include to get that dtostrf function.

Sent from my iPhone

On Apr 24, 2016, at 8:02 AM, sven250 notifications@github.com wrote:

When i try to compile my sketch for my Genuino MKR1000 (hackster edition), i get the following error:

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:27:22: fatal error: pgmspace.h: No such file or directory

include "pgmspace.h"

                  ^

compilation terminated.

exit status 1 Error compiling for board Arduino/Genuino MKR1000. When I try to compile on the Arduino Uno settings, it works fine. But I don't have an Uno...

After copying the pgmspace.h file to the C:***\arduino-1.6.8\libraries\phant-arduino-master\src folder the error changed to:

Arduino: 1.6.8 (Windows 7), Board:"Arduino/Genuino MKR1000"

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(String, double)':

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:152:26: error: 'dtostrf' was not declared in this scope

dtostrf(data, 1, 4, tmp);

                      ^

C:\Users**_\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(const _FlashStringHelper, double)':

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:162:26: error: 'dtostrf' was not declared in this scope

dtostrf(data, 1, 4, tmp);

                      ^

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(String, float)':

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:174:26: error: 'dtostrf' was not declared in this scope

dtostrf(data, 1, 4, tmp);

                      ^

C:\Users**_\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp: In member function 'void Phant::add(const _FlashStringHelper, float)':

C:\Users***\Documents\arduino-1.6.8\libraries\phant-arduino-master\src\Phant.cpp:184:26: error: 'dtostrf' was not declared in this scope

dtostrf(data, 1, 4, tmp);

                      ^

exit status 1 Error compiling for board Arduino/Genuino MKR1000.

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

I hope anyone can help me!

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

svenvdvoort commented 8 years ago

I think you may need to include to get that dtostrf function.

That didn't work... The problem with dtostrf() is that it's a AVR function, which means it can't be used on ARM boards (the MKR1000 is a 32-bit ARM based board). I read something about the stringf() function, but I don't know the difference between them. Maybe anyone can replace dtostrf() with stringf()? Thanks in advance!

tshrjn commented 8 years ago

Same problem with Intel Galileo2.

bboyho commented 6 years ago

Phant is No Longer in Operation

Unfortunately Phant, our data-streaming service, is no longer in service and will be discontinued. The system has reached capacity and, like a less-adventurous Cassini, has plunged conclusively into a fiery and permanent retirement. There are several other maker-friendly, data-streaming services and/or IoT platforms available as alternatives. The three we recommend are Blynk, ThingSpeak, and Cayenne. You can read our blog post [ https://www.sparkfun.com/news/2413 ] on the topic for an overview and helpful links for each platform.