Cannot upload code for arduino and esp8266 nodemcu

I am making a smart scale using 2 loadcells, arduino and a nodemcu (esp8266). I want to send the data to a remote server. I am trying to upload the attached code to arduino but a lot of errors are thrown at me while compiling. Please view the two attached files. Some one please guide me as I'm a new to iot. Thanks in advance.

sketch_nov16c.ino (2.27 KB)

log.txt (27.9 KB)

uploading a new code does always overwrite your code inside the flash-memory. There is no way around it.
except for very special ways of reading and writing to flash-memory that is highly sophisticated.

about the errors just copy the word error: and the "explanation" into a google-search

error: stray - Google Search'\342'+in+program

and voila a lot of hits

best regards Stefan

Thankyou for your reply. I solved the earlier errors. But now have a new one. I have done a google search but haven't got any compelling results. Can you tell me what this is ?
Error code : no matching function for call to 'println(const char [10], const char [14])'

post the complete sketch as it is now. Without your sketch there could a dozen reasons causing this error

I guess including stdlib.h is not nescessay (and maybe even causing the compiler-error)

as a general hint:

this AT-firmware is a big hassle to use.
You should write a program for the ESP8266 in the arduino-IDE yourself that receives the data
and sends the data to the remote-server.

As you have already seen by the errors before. The demo-code you found is of "unknown quality".

I'm not experienced in client-server-connections. But there will be many many example out there that do send data
in a similar way that you want.

Using global defined Strings will eat up all RAM-memory over time and then will cause crashing the program or strange behaviour.

So you should describe in detail what you want to do all in all. On a functional level (not the code-level)

If I read the HX711.h-library right the load-cell-sensors have a digital interface. This means there is a good change to eliminate the Arduino and do everything on the ESP8266 including all the HX711.h-load-cell-stuff.
my personal experience is that most sensor-libraries that are written for arduino work on ESP8266 and ESP32 too.

best regards Stefan

#include <SoftwareSerial.h>
#include "HX711.h"
#include <stdlib.h>
SoftwareSerial ESP8266(7, 8); // nodemcu module connected here
#define DOUT  3
#define CLK  2
HX711 scale;
int rbutton = 6; // this button will be used to reset the scale to 0. 
String myString; 
String cmessage; // complete message
char buff[10];
float weight; 
float calibration_factor = -45000; // for me this vlaue works just perfect 419640 
void setup() {
scale.begin(DOUT, CLK);
pinMode(rbutton, INPUT_PULLUP); 
scale.tare(); //Reset the scale to 0
long zero_factor = scale.read_average(); //Get a baseline reading
void loop() {

Serial.println("Establishing connection type…");
Serial.println("Setting WiFI mode…");
Serial.println("Connecting to WiFi");
ESP8266.println("<CrayNet>","<kindig@1345>"); //insert your own SSID and password here
Serial.println("Establishing TCP connection");

scale.set_scale(calibration_factor); //Adjust to this calibration factor

weight = scale.get_units(5); //5
myString = dtostrf(weight, 3, 2, buff);
cmessage = cmessage + "Weight" + ":" + myString + "Kg"+","; 

Serial.println("Sending out data…");
ESP8266.println("POST /read.php HTTP/1.1");
ESP8266.println("Host: <>");    //insert your own site address or IP here
ESP8266.println("User-Agent: Mozilla"); //We need this so that the server can identify the sender
ESP8266.println("Content-Type: application/x-www-form-urlencoded");
ESP8266.println("Content-length: 9"); //make sure this matches the content that follows

cmessage = "";
if ( digitalRead(rbutton) == LOW)
scale.tare(); //Reset the scale to 0


Here is the full sketch as of now. I don't know how the at commands work. But this program worked in another project so I am willing to use it and make it work. I have tried using the nodemcu only but it didn;t work and I don't know the exact reason why. Anyhow all I need is a good documentation about the nodemcu. If you know about one please share it. Thankyou for your reply.

hm post the full error-messages as a code-section the compiler quotes the codeline where the error occurs

which HX711-libarary do you use

Rob Tilllaart
bogdan necula
Olav Kallhovd
Scott Russel

the Arduino-IDE does change the color of that line of code where the error occurs

it is line

  ESP8266.println("<CrayNet>", "<kindig@1345>"); //insert your own SSID and password here

the function println() accepts only one parameter so all call of function println() that have multiple parameters that are separated by a comma must be divided in multiple single-parameter calls.

  ESP8266.println("<kindig@1345>"); //insert your own SSID and password here


I don't know much about formating macros of the compiler like "F" "sprintf" etc. maybe the could be used too
best regards Stefan