2 Load cell connected in NodeMcu

Hi i am doing a project using load cell using NodeMcu board. when i am uploading, it gets uploaded but while look in to serial monitor the values are not displaying instead some other data. what to do i have tried several times but same result. here is my code and serial monitor response. please help me to resolve it

//serial monitor

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00044d50
~ld

this is my code
#include "HX711.h"
#include <ESP8266WiFi.h>;
String apiKey = "3DHYLTJBZOF4DFTO"; // Enter your Write API key from ThingSpeak
const char *ssid = "BYNARK"; // replace with your wifi ssid and wpa2 key
const char pass = "bynark@123";
const char
server = "api.thingspeak.com";
WiFiClient client;
HX711 scale(D5, D6);
HX711 scale1(D2, D1);
int rbutton = D4; // this button will be used to reset the scale to 0.
float weight;
float weight1;
float calibration_factor = -101525; // for me this vlaue works just perfect 419640
float calibration_factor1 = -101525;
void setup()
{
Serial.begin(115200);
pinMode(rbutton, INPUT_PULLUP);
scale.set_scale();
scale1.set_scale();
scale.tare(); //Reset the scale to 0
scale1.tare();
long zero_factor = scale.read_average(); //Get a baseline reading
long zero_factor1 = scale1.read_average();
WiFi.begin(ssid, pass);
{
delay(500);
Serial.print(".");
//lcd.clear();
}
Serial.println("");
Serial.println("WiFi connected");
delay(3000);
}
void loop()
{
scale.set_scale(calibration_factor); //Adjust to this calibration factor
scale1.set_scale(calibration_factor);
weight = scale.get_units(5);
weight1 = scale1.get_units(5);
Serial.print("W: ");
Serial.print(weight);
Serial.println(" KG");
Serial.print("W1: ");
Serial.print(weight1);
Serial.println(" KG");
Serial.println();
if ( digitalRead(rbutton) == LOW)
{
scale.set_scale();
scale.tare(); //Reset the scale to 0
}
if (client.connect(server, 80)) // "184.106.153.149" or api.thingspeak.com
{
String postStr = apiKey;
postStr +="&field1=";
postStr += String(weight);
postStr += "\r\n\r\n";
postStr +="&field2=";
postStr += String(weight1);
postStr += "\r\n\r\n";
client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);
}
client.stop();
Serial.println("Waiting...");
//delay(1500); // thingspeak needs minimum 15 sec delay between updates.
}

Please post code and serial monitor output using code tags as described in the forum guide. Please edit your posts above and correct that.

The message you see on serial monitor indicates there had been a reset forced by the watchdog timer. That happens when something in your code takes too long or had got stuck.

Did you use a HX711 board from Sparkfun.com ?
Their board is the only one I know off that can work with a 3.3volt processor, like the ESP8266 on the NodeMCU. Common (ebay) 5volt HX711 boards can be used, but most be modified for 3.3volt for stable operation.

If you use a HX711-multi library, then you can share the clock signals (three wires for two boards).
Leo..

sorry HX711 is not from sparkfun. But when i am using single load cell the value get displayed in serial monitor as well as thingspeak

Add more serial prints to see where it gets stuck.

sir can we connect two load cell in NodeMcu board

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.