arduino to google sheet

Welcome:

I’ve worked on a program to receive the data from the Arduino board to another Arduino board via serial to serial

Then the other Arduino linked me to the ethrnet board to send data to Google sheet.
But could not I receive a whole sentence?

this picture: http://prntscr.com/ghlmfi
please help
:’( :’(

#include <SPI.h>
#include <Ethernet.h>
//-------------------------------------------------------------------------------
byte mac = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //Setting MAC Address
char server = “api.pushingbox.com”;r
IPAddress ip(192,168,1,7);
EthernetClient client;
String data;
String suhu;
boolean koneksi = false;
//------------------------------------------------------------------------------
void setup() {
Serial.begin(115200);
if (Ethernet.begin(mac) == 0) {
Serial.println(“Failed to configure Ethernet using DHCP”);
Ethernet.begin(mac, ip);
}
delay(1000);
}
//------------------------------------------------------------------------------
void loop(){
if (Serial.available() > 0) {

suhu = Serial.readString();
}
// ADC to celcius conversion
kemasData(); //packing GET query with data
Serial.println(“connecting…”);
if (client.connect(server, 80)) {
sendData();
koneksi = true; //connected = true
}
else{
Serial.println(“connection failed”);
}
// loop
while(koneksi){
if (client.available()) {
char c = client.read(); //save http header to c
Serial.print(c); //print http header to serial monitor
}
if (!client.connected()) {
Serial.println();
Serial.println(“disconnecting.”);
Serial.print(“Temperature Sent :”);
Serial.println(suhu); //print sent value to serial monitor
client.stop();
koneksi = false;
data = “”; //data reset
}
}
delay(5000); // interval
}

void kemasData(){
data+="";
data+=“GET /pushingbox?devid=vB990F945F7F0481&tempData=”; //GET request query to pushingbox API
data+=suhu;
data+=" HTTP/1.1";
}
void sendData(){
Serial.println(“connected”);
client.println(data);
client.println(“Host: api.pushingbox.com”);
client.println(“Connection: close”);
client.println();
}

But could not I receive a whole sentence?

Why not? What defines “a whole sentence”? The Arduino doesn’t know sentences from fence posts.

PaulS: Why not? What defines "a whole sentence"? The Arduino doesn't know sentences from fence posts.

When a wire is connected between the two board, the data is not sent.

When remove the wire it sends empty data to Google sheet.

When a wire is connected between the two board, the data is not sent.

But, is the wire blue? You need to use a blue wire. 8 gauge.

Post a schematic showing where the wire(s) is(are) connected between the two boards.

  data+="";

Take pains to add nothing to the String instance. Why do you bother?

Do you KNOW what causes readString() to stop reading? If not, STOP USING readString().

PaulS: But, is the wire blue? You need to use a blue wire. 8 gauge.

Post a schematic showing where the wire(s) is(are) connected between the two boards.

  data+="";

Take pains to add nothing to the String instance. Why do you bother?

Do you KNOW what causes readString() to stop reading? If not, STOP USING readString().

I deleted (data+="") but did not work with me

Welcome:

I’ve worked on a program to receive the data from the Arduino board to another Arduino board via serial to serial

Then the other Arduino linked me to the ethrnet board to send data to Google sheet.

When a connection TX and RX, I receives data in serial monitor but does not send anything to google sheet

why???

#include <SPI.h>
#include <Ethernet.h>
//-------------------------------------------------------------------------------
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //Setting MAC Address
char server[] = "api.pushingbox.com"; //pushingbox API server
IPAddress ip(192,168,1,7); //Arduino IP address. Only used when DHCP is turned off.
EthernetClient client; //define 'client' as object
String data; //GET query with data
String suhu; //suhu (bahasa Indonesia) means temperature
boolean koneksi = false;
//------------------------------------------------------------------------------
void setup() {
  Serial.begin(115200);
  if (Ethernet.begin(mac) == 0) {
	Serial.println("Failed to configure Ethernet using DHCP");
	Ethernet.begin(mac, ip);
  }
  delay(1000);
}
//------------------------------------------------------------------------------
void loop(){
   if (Serial.available() > 0) {      
   suhu =  Serial.readString();
   }// ADC to celcius conversion
   kemasData(); //packing GET query with data
   Serial.println("connecting...");
   if (client.connect(server, 80)) {
     sendData();  
     koneksi = true; //connected = true
   }
   else{
     Serial.println("connection failed");
   }
  // loop
  while(koneksi){
    if (client.available()) {
	  char c = client.read(); //save http header to c
	  Serial.print(c); //print http header to serial monitor
    }
    if (!client.connected()) {
	  Serial.println();
	  Serial.println("disconnecting.");
          Serial.print("Temperature Sent :");
          Serial.println(suhu); //print sent value to serial monitor
	  client.stop(); 
          koneksi = false; 
          data = ""; //data reset
    }
  }
  delay(5000); // interval
}

void kemasData(){
  data+="";
  data+="GET /pushingbox?devid=vB990F945F7F0481&tempData="; //GET request query to pushingbox API
  data+=suhu;
  data+=" HTTP/1.1";
}
void sendData(){
  Serial.println("connected");
  client.println(data);
  client.println("Host: api.pushingbox.com");
  client.println("Connection: close");
  client.println();
}

DON’T CROSS POST!!!

I HAVE REPORTED THIS THREAD TO THE MODERATORS

Threads merged.

PaulS: But, is the wire blue? You need to use a blue wire. 8 gauge.

Post a schematic showing where the wire(s) is(are) connected between the two boards.

  data+="";

Take pains to add nothing to the String instance. Why do you bother?

Do you KNOW what causes readString() to stop reading? If not, STOP USING readString().

When wires are not connected is ok

like this: http://prntscr.com/giq2z7

When wires are connected is not send like this: http://prntscr.com/giq58v

pleas help me