-->
Page 7 of 9

Re: Code help wanted for ESP-01 + Arduino IDE project.

PostPosted: Wed Oct 07, 2015 11:17 am
by martinayotte
derek bernsen wrote:but with the other code it just keeps the LED lit at all times

With my code above, of course, if you don't reverse the HIGH/LOW on LED, it will be ON all the time, since the reverse wiring is done, but it will OFF momentarily at the connect. Simply reverse the HIGH/LOW on those digitalWrite().
Other then that, I don't see why it is not working, since it is working on my side, and the Serial output is also proving that.
The only pitfall I saw, as mentioned earlier is that sometime the disconnect is not efficient.

Re: Code help wanted for ESP-01 + Arduino IDE project.

PostPosted: Wed Oct 07, 2015 11:34 am
by voyager
Do you mean the Module is not reliable or is it the software ?

Re: Code help wanted for ESP-01 + Arduino IDE project.

PostPosted: Wed Oct 07, 2015 11:39 am
by martinayotte
voyager wrote:Do you mean the Module is not reliable or is it the software ?

Do you mean the disconnect issue I've mentioned above ?
I don't know yet, but what I saw few times is that the connection count was not coming back to zero after I've disconnected my PC from the AP. It is probably a firmware issue.

Re: Code help wanted for ESP-01 + Arduino IDE project.

PostPosted: Wed Oct 07, 2015 1:20 pm
by derek bernsen
With the following code, my ESP-01 circuit keeps the LED on pin 16 on at all times, and it flickers in varying brightnesses, but never is unlit:
Code: Select all/*
 ESP8266 Blink
 */

void setup() {
  pinMode(16, OUTPUT);     // Initialize the RST  pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(16, LOW);   // Turn the LED on (Note that LOW is the voltage level
                                    // but actually the LED is on; this is because
                                    // it is acive low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(16, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}
 



I don't think it is supposed to do that with the above code...