MySQL Forums
Forum List  »  Connector/Arduino

MySQL connector arduino
Posted by: Ole Chr Pettersen
Date: November 10, 2015 05:33PM

Hi

im having coding problems connecting an temperature sensor too the MySQL.
The trouble is defining the code for the sensor.
it's the Ds1820 temp sensor.

"
celsius = (float)raw / 16.0;
fahrenheit = celsius * 1.8 + 32.0;
Serial.print(" Temperature = ");
Serial.print(celsius);
Serial.print(" Celsius, ");
Serial.print(fahrenheit);
Serial.println(" Fahrenheit");
char query[64];
sprintf(query, INSERT_DATA, celsius);
my_conn.cmd_query(query);
}
"

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL connector arduino
1301
November 10, 2015 05:33PM
705
December 01, 2015 01:07PM
516
December 01, 2015 01:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.