Skip to content

Instantly share code, notes, and snippets.

Created May 6, 2014 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/76659dec9e3e9a34b187 to your computer and use it in GitHub Desktop.
Save anonymous/76659dec9e3e9a34b187 to your computer and use it in GitHub Desktop.
int return_num(String num){
int Local_Variable;
Local_Variable = atoi(num);
return Local_Variable + 1234;
}
void setup()
{
Spark.function("return_num", return_num);
}
// This routine loops forever
void loop()
{
// Nothing to do here
}
In file included from ../inc/spark_wiring.h:30:0,
from ../inc/application.h:31,
from curl_blinker.cpp:2:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
curl_blinker.cpp: In function 'int return_num(String)':
curl_blinker.cpp:8:30: error: cannot convert 'String' to 'const char*' for argument '1' to 'int atoi(const char*)'
make: *** [curl_blinker.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment