Wemos D1 mini

Hello

I have one question

I have 1 code that works on one Wemos D1 Mini with out any problem, on other i get this error

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

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld

What could be wrong.

the error-message you posted does not tell anything about what really caused the error.

To narrow down this problem you have to post the whole sketch from the very first to the very last line.
Use the insert-code-button for inserting code. This button looks like this <|>

If I hold my glas-shere in front of your error-message I can see absolutely nothing inside the glas-spehre.
Even the letters got deformed that the error-message is hard to read.

best regards Stefan

Hello this is main code then i have more tabs with sub programs.

#include <ESP8266WiFi.h>
#include "EEPROM.h"

String CLIENT_NAME = "SPOOL1";

IPAddress server(192, 168, 4, 1);  // fix IP of the server
WiFiClient client;

const char *ssid = "Filamentsystem";
const char *pass = "3dmonstrum";
unsigned long askTimer = 1;
String answer;
String data;
String CLIENT;
String ACTION;

//###################### Display Settings ####################

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128        // OLED display width, in pixels
#define SCREEN_HEIGHT 32        // OLED display height, in pixels
#define CHAR_WIDTH 6            // How many pixels wide is a size 1 charater
#define CHAR_HEIGHT 8           // How many pixels wide is a size 2 character

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
bool displayPresent = false;    // A Boolean for storing if the front LCD is present

//############################################################
//################### Color Sensor Settings ##################

#include "Adafruit_TCS34725.h"
Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_700MS, TCS34725_GAIN_4X);
int R = 0;
int G = 0;
int B = 0;

bool colorPresent = false;
int color;

#define CALIB_PIN    D5

//############################################################
//################### HX711 Weight Sensor Settings ##################
#include "HX711.h"
// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = D7;
const int LOADCELL_SCK_PIN = D6;
HX711 scale;

// Weight = (rawWeight + rawOffset) * scaleScale + offset

int Weight = 1000;                  // Weight updated in Loop, scaled and offset
long rawWeight = 0;                 // Raw Value from the Scale
long rawOffset = 0;                 // Raw Offset from scale value
int offset = 0;                     // Scaled Offset, used to store empty weight of spool
float scaleScale = 1;               // Scaling value

// The following are for color detection
uint16_t rawRed, rawGreen, rawBlue, rawClear;   // The unscaled / unoffset color value from sensor
uint16_t rbR, rbG, rbB; // Offset of raw value to make the value zero
uint16_t rwR, rwG, rwB; // Used for scaling, this stores the white value coorisponding to 255
float Red;
float Green;
float Blue;
int flag;
int valIn;
int clippedWeight;
String mass = "0";
String mass1 = "1";
int Color_read = 0;
int calib_int = 0;

void setup() {
  pinMode(CALIB_PIN, INPUT);   
  readSettings();
  // If the EEPROM is fresh, the flag will not be "123", initialize values to defaults
  if (flag != 123)
  {
    rbR = 0;
    rbG = 0;
    rbB = 0;
    rwR = 255;
    rwG = 255;
    rwB = 255;
    scaleScale = 1;
    rawOffset = 0;
    offset = 0;
    handleScale();
    writeSettings();
  }
  if (scaleScale == 0)
    scaleScale = 1;

  Serial.begin(115200);

#ifdef ESP8266
  //Wire.pins(2, 14);
  //Wire.setClockStretchLimit(15000);
#endif

  // Start the I2C Comunication
  Wire.begin();
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, pass);
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  delay(2000);
  Serial.println();
  Serial.println("WiFi Connected");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  //Initialize Display
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x32
    Serial.println(F("SSD1306 allocation failed"));
    displayPresent = false;
  }
  else
  {
    Serial.println("SSD1306 Found");
    displayPresent = true;
  }

  //Initialize Color Sensor
  if (tcs.begin()) {
        Serial.println("Color sensor Found");
        colorPresent = true;
    } 
    else 
    {
        Serial.println("No TCS34725 found ... check your connections");
        colorPresent = false;
    }
  // Setup and drive LOW the color sensor boards white LED
  pinMode(2, OUTPUT);
  digitalWrite(2, HIGH);

  //Initialize scale
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
    
  
  displayInfo2(); 
  Color_sensor();
  delay(30); 
  Color_sensor();
  delay(30);  
  Color_sensor();
  delay(30); 
  Color_sensor();
  delay(30);  
  Color_sensor();
  delay(30);  
    
}

void loop () {
  if (millis() - askTimer > 10) {
    if (!client.connect(server, 80)) {
      while (WiFi.status() != WL_CONNECTED) {
//        Serial.print(".");
//        digitalWrite(LED_GREEN, LOW); //Indicate wifi is not connected
//        delay(500);
      }
//      Serial.print("+");
//      digitalWrite(LED_GREEN, LOW); //Indicate client is not connected
//      delay(100);
      return;
    }
    else
    {
//      digitalWrite(LED_GREEN, HIGH); //Indicate client is connected
    }
    
    if(digitalRead(CALIB_PIN)== LOW && calib_int == 0)
    {
       handleCalBlack();
       displayColorInfo1();
       calib_int=calib_int+1;
    }

    if(digitalRead(CALIB_PIN)== LOW && calib_int == 1)
    {
       handleCalWhite();
       displayColorInfo2();
       calib_int=calib_int+1;
    } 

    if(digitalRead(CALIB_PIN)== LOW && calib_int == 2)
    {
       displayColorInfo3();
       calib_int = 0;
    }

    data = client.readStringUntil('\r');  // received the server's answer
    if (data != "\0")
    {
      int Index = data.indexOf(':');

      CLIENT = data.substring(0, Index);
      ACTION = data.substring(Index + 1);

      if (CLIENT == CLIENT_NAME)
      {
        if (ACTION == "S1W?")
        {    
          displayHomeScreen();
          scale_program();
          client.println("Spool1W:" + (String(String(clippedWeight,DEC))) + "            " + (String(String(color,DEC)))); 
          if(clippedWeight <= 0)
          {
            displayInfo2();
            Color_sensor();
            delay(30); 
            Color_sensor();
            delay(30);  
            Color_sensor();
            delay(30); 
            Color_sensor();
            delay(30);  
            Color_sensor();
            delay(30); 
          }

        }        
        if (ACTION == "1000?")
        { 
          mass = "1253";
          //Serial.println("1000");
          //Serial.println(mass);
          handleScale();
        } 
        if (ACTION == "CALB1?")
        {
          handleCalBlack();
          displayColorInfo1();
        }
        if (ACTION == "CALW1?")
        {
          handleCalWhite();
          displayColorInfo2();
        }                      
        
        if (ACTION == "TARE1?")
        {
          //Serial.println("Tare");
          handleTare();
        }
      }

      client.flush();
      askTimer = millis();
      data = "\0";

    }
  }
}