Skip to main content
deleted 40 characters in body; edited title
Source Link
dda
  • 1.6k
  • 1
  • 12
  • 18

Sending value from arduinoArduino to mysqlMySQL using esp8266ESP8266

I am trying to send a value from arduinoArduino to a remote MySQL. I I am following the tutorial as per given in http://bryceautomation.com/index.php/2016/12/24/logging-data-to-web-page-using-arduino-and-esp8266-01-at-command-set/this tutorial.

I have tried but no data is received aton the server. What What is the issue? I am new to arduinoArduino. My code is:

int led1=8;
int count=1;
void setup() {
  pinMode(led1, OUTPUT);
  delay(3000);
 
  // initialize serial communication at 9600 bits per second:
  Serial.begin(115200);
  Serial.println("AT+CWMODE=1");
  delay(1000);
  Serial.println("AT+CWJAP=\"mhboys\",\"mhboys123\"");
  delay(1000);
 
}

// the loop routine runs over and over again forever:
void loop() {

 
  digitalWrite(led1,HIGH);
  // turn the LED on (HIGH is the voltage level)
  delay(1000);  // wait for a second
  if(digitalRead(led1)==LOW)
  { 
    }
  if(digitalRead(led1)==HIGH)
  {  
    count++;
    
    
    //code for sending updated count to mysql
  } 
  digitalWrite(led1, LOW);   
  // turn the LED off by making the voltage LOW
  delay(1000);                    // wait for a second
 
  int adjustedValue = count;
  // print out the value you read:
  Serial.println("AT+CIPSTART=\"TCP\",\"www.onemediagroup.in\",80");
  delay(1000);
  Serial.println("AT+CIPSEND=66");
  delay(1000);
  Serial.print("GET /energy/getUsage.php?currentValue=");
  Serial.print(adjustedValue);
  delay(1000);
  Serial.println("AT+CIPCLOSE");
  digitalWrite(13, HIGH);
  delay(100000); // delay in between reads for stability
}

Sending value from arduino to mysql using esp8266

I am trying to send a value from arduino to remote MySQL. I am following the tutorial as per given in http://bryceautomation.com/index.php/2016/12/24/logging-data-to-web-page-using-arduino-and-esp8266-01-at-command-set/

I have tried but no data is received at the server. What is the issue? I am new to arduino. My code is

int led1=8;
int count=1;
void setup() {
pinMode(led1, OUTPUT);
delay(3000);
 
// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
Serial.println("AT+CWMODE=1");
delay(1000);
Serial.println("AT+CWJAP=\"mhboys\",\"mhboys123\"");
delay(1000);
 
}

// the loop routine runs over and over again forever:
void loop() {

 
  digitalWrite(led1,HIGH);
 // turn the LED on (HIGH is the voltage level)
  delay(1000);  // wait for a second
  if(digitalRead(led1)==LOW)
  { 
    }
  if(digitalRead(led1)==HIGH)
  {  
    count++;
    
    
    //code for sending updated count to mysql
  } 
  digitalWrite(led1, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                    // wait for a second
 
int adjustedValue = count;
// print out the value you read:
Serial.println("AT+CIPSTART=\"TCP\",\"www.onemediagroup.in\",80");
delay(1000);
Serial.println("AT+CIPSEND=66");
delay(1000);
Serial.print("GET /energy/getUsage.php?currentValue=");
Serial.print(adjustedValue);
delay(1000);
Serial.println("AT+CIPCLOSE");
digitalWrite(13, HIGH);
delay(100000); // delay in between reads for stability
}

Sending value from Arduino to MySQL using ESP8266

I am trying to send a value from Arduino to a remote MySQL. I am following this tutorial.

I have tried but no data is received on the server. What is the issue? I am new to Arduino. My code is:

int led1=8;
int count=1;
void setup() {
  pinMode(led1, OUTPUT);
  delay(3000);
  // initialize serial communication at 9600 bits per second:
  Serial.begin(115200);
  Serial.println("AT+CWMODE=1");
  delay(1000);
  Serial.println("AT+CWJAP=\"mhboys\",\"mhboys123\"");
  delay(1000);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led1,HIGH);
  // turn the LED on (HIGH is the voltage level)
  delay(1000);  // wait for a second
  if(digitalRead(led1)==LOW) {}
  if(digitalRead(led1)==HIGH) {
    count++;
    //code for sending updated count to mysql
  }
  digitalWrite(led1, LOW); 
  // turn the LED off by making the voltage LOW
  delay(1000); // wait for a second
  int adjustedValue = count;
  // print out the value you read:
  Serial.println("AT+CIPSTART=\"TCP\",\"www.onemediagroup.in\",80");
  delay(1000);
  Serial.println("AT+CIPSEND=66");
  delay(1000);
  Serial.print("GET /energy/getUsage.php?currentValue=");
  Serial.print(adjustedValue);
  delay(1000);
  Serial.println("AT+CIPCLOSE");
  digitalWrite(13, HIGH);
  delay(100000); // delay in between reads for stability
}
added code
Source Link
Sanju
  • 21
  • 3

I am trying to send a value from arduino to remote MySQL. I am following the tutorial as per given in http://bryceautomation.com/index.php/2016/12/24/logging-data-to-web-page-using-arduino-and-esp8266-01-at-command-set/

I have tried but no data is received at the server. What is the issue? I am new to arduino. My code is

int led1=8;
int count=1;
void setup() {
pinMode(led1, OUTPUT);
delay(3000);

// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
Serial.println("AT+CWMODE=1");
delay(1000);
Serial.println("AT+CWJAP=\"mhboys\",\"mhboys123\"");
delay(1000);

}

// the loop routine runs over and over again forever:
void loop() {


  digitalWrite(led1,HIGH);
 // turn the LED on (HIGH is the voltage level)
  delay(1000);  // wait for a second
  if(digitalRead(led1)==LOW)
  { 
    }
  if(digitalRead(led1)==HIGH)
  {  
    count++;
    
    
    //code for sending updated count to mysql
  } 
  digitalWrite(led1, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                    // wait for a second

int adjustedValue = count;
// print out the value you read:
Serial.println("AT+CIPSTART=\"TCP\",\"www.onemediagroup.in\",80");
delay(1000);
Serial.println("AT+CIPSEND=66");
delay(1000);
Serial.print("GET /energy/getUsage.php?currentValue=");
Serial.print(adjustedValue);
delay(1000);
Serial.println("AT+CIPCLOSE");
digitalWrite(13, HIGH);
delay(100000); // delay in between reads for stability
}

I am trying to send a value from arduino to remote MySQL. I am following the tutorial as per given in http://bryceautomation.com/index.php/2016/12/24/logging-data-to-web-page-using-arduino-and-esp8266-01-at-command-set/

I have tried but no data is received at the server. What is the issue? I am new to arduino.

I am trying to send a value from arduino to remote MySQL. I am following the tutorial as per given in http://bryceautomation.com/index.php/2016/12/24/logging-data-to-web-page-using-arduino-and-esp8266-01-at-command-set/

I have tried but no data is received at the server. What is the issue? I am new to arduino. My code is

int led1=8;
int count=1;
void setup() {
pinMode(led1, OUTPUT);
delay(3000);

// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
Serial.println("AT+CWMODE=1");
delay(1000);
Serial.println("AT+CWJAP=\"mhboys\",\"mhboys123\"");
delay(1000);

}

// the loop routine runs over and over again forever:
void loop() {


  digitalWrite(led1,HIGH);
 // turn the LED on (HIGH is the voltage level)
  delay(1000);  // wait for a second
  if(digitalRead(led1)==LOW)
  { 
    }
  if(digitalRead(led1)==HIGH)
  {  
    count++;
    
    
    //code for sending updated count to mysql
  } 
  digitalWrite(led1, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                    // wait for a second

int adjustedValue = count;
// print out the value you read:
Serial.println("AT+CIPSTART=\"TCP\",\"www.onemediagroup.in\",80");
delay(1000);
Serial.println("AT+CIPSEND=66");
delay(1000);
Serial.print("GET /energy/getUsage.php?currentValue=");
Serial.print(adjustedValue);
delay(1000);
Serial.println("AT+CIPCLOSE");
digitalWrite(13, HIGH);
delay(100000); // delay in between reads for stability
}
Source Link
Sanju
  • 21
  • 3

Sending value from arduino to mysql using esp8266

I am trying to send a value from arduino to remote MySQL. I am following the tutorial as per given in http://bryceautomation.com/index.php/2016/12/24/logging-data-to-web-page-using-arduino-and-esp8266-01-at-command-set/

I have tried but no data is received at the server. What is the issue? I am new to arduino.