loading
1Comments

Tell us about yourself!

Complete Your Profile
  • Save data of temperature and humidity on MySQL with Arduino Uno and Wifly

    Hi,It does not work with my code. I meant it does not send the data to my local Mysql. Please kindly help. The code is here below: #include <SPI.h>#include <Ethernet.h>#include <String.h>byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };byte ip[] = {192,168,1,110}; //address of arduinobyte server[] = {192,168,1,1};//address of rooterEthernetClient client;float sensor = 0;void setup() {Serial.begin(115200);Ethernet.begin(mac, ip);}void loop() {char comend = Serial.read();if(comend == 'a'){if(client.connect(server,80)){Serial.println("connected...");sensor = sensor + 5;client.print("GET /arduino/tempTest/templogin.php?");client.print("sensor=");client.print(sensor);Serial.print("Sensor = ");Serial.print(sensor);Serial.println();c...see more »Hi,It does not work with my code. I meant it does not send the data to my local Mysql. Please kindly help. The code is here below: #include <SPI.h>#include <Ethernet.h>#include <String.h>byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };byte ip[] = {192,168,1,110}; //address of arduinobyte server[] = {192,168,1,1};//address of rooterEthernetClient client;float sensor = 0;void setup() {Serial.begin(115200);Ethernet.begin(mac, ip);}void loop() {char comend = Serial.read();if(comend == 'a'){if(client.connect(server,80)){Serial.println("connected...");sensor = sensor + 5;client.print("GET /arduino/tempTest/templogin.php?");client.print("sensor=");client.print(sensor);Serial.print("Sensor = ");Serial.print(sensor);Serial.println();client.stop();}else {Serial.println("Not connected...");client.stop();}}}

    View Instructable »