Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
So I want to take the value from a digital in or adc port, and send it to a mysql database, using the MySQL Client in the cookbook.
However whenever I try and add my digital pin variable to the code, it tells me "argument is incompatible with corresponding format string conversion"
this is my input:
DigitalIn in7(p7);
and this is the sql code (var1 was the example value to output to sql)
SQL Command Make command char cmd[128] = {0}; const char* var1="Hello World!"; sprintf(cmd, "INSERT INTO test (test) VALUES('%d')", in7);
Anyone have any suggestions
Thanks!