Reset function of Adafruit HUZZAH ESP8266

Hi,
I am not sure this problem is from Adafruit or programming in Arduino IDE. If I post in the wrong place, kindly tell me.

I found that when I power the Adafruit board, I need to press reset button on this board. Then it can start to receive signal from Arduino Due (Anotehr board). Why Adafruit board need to be pressed and start to receive? I mean it can not reset when it is powered?

void setup() {
  Serial.begin(115200);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(14, OUTPUT);
  pinMode(2, OUTPUT);
  digitalWrite(12, LOW);
  digitalWrite(13, LOW);
  digitalWrite(14, LOW);
  delay(1000);
  //pinMode(4,INPUT);
  //pinMode(12,INPUT);
}

void loop() {
  if (Serial.available() > 0) {
    int inByte1 = Serial.read();
    switch (inByte1) {

      case '1': //do cleaning
        delay(1000);
        //delay(1800);// synchronize Due and HUZZAH
        //saturation 3 times
        digitalWrite(12, HIGH); //solenoid valve open
        digitalWrite(14, HIGH); //pinch valve open
        delay(30000);
        digitalWrite(14, LOW); //pinch valve open
        delay(10000);
        digitalWrite(14, HIGH); //pinch valve open
        delay(30000);
        digitalWrite(14, LOW); //pinch valve open
        delay(10000);
        digitalWrite(14, HIGH); //pinch valve open
        delay(30000);
        digitalWrite(14, LOW); //pinch valve open
        delay(10000);
        digitalWrite(12, LOW); //solenoid valve close
        break;



      case '2': // do FE
        delay(1000);

        //flushing step
        digitalWrite(12, HIGH); //solenoid valve open
        digitalWrite(14, LOW); //pinch valve open
        delay(15000);

        //saturation step
        digitalWrite(14, HIGH); //pinch valve close
        digitalWrite(13, HIGH); //motor on
        delay(60000);

        //extraction step
        digitalWrite(14, LOW); //pinch valve
        //digitalWrite(12,HIGH);//extraction 15s
        //digitalWrite(13,HIGH);
        delay(30000);

        digitalWrite(12, LOW);
        digitalWrite(13, LOW);
        digitalWrite(14, HIGH);
        delay(1000);

        break;

      case'3':
        digitalWrite(2, 1); // LED off
        delay(3000);
        digitalWrite(2, 0); // LED on
        delay(3000);
        digitalWrite(2, 1); // LED off
    }
  }
}```

To narrow down the problem yiu have to reduce the number of unknown variables.
Take a small code that is well known to work as expecteced.

Did you try the very classical blink onboard led and this small code shows the same behaviour.

best regards Stefan

Hi,

You mean if this board can reset by using simple code, then it will also work in other code?

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