Hi, guys.
Found a problem with the NodeMCU v.0.1 board (esp-12E). In the Blynkedgent when port D8 (GPIO15) is used it does not respond to the digitalWrite(15, 1). The port is not set to HIGH. In another sketch without Blynkedgent, the same port works fine. What could be the problem, maybe someone has solved this?
// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPL2K_Nz6Lo"
#define BLYNK_DEVICE_NAME "Garage"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
#define APP_DEBUG
#include "BlynkEdgent.h"
void setup()
{
Serial.begin(115200);
delay(100);
pinMode(2, OUTPUT);
digitalWrite(2, LOW);
pinMode( 16, OUTPUT );
pinMode( 12, OUTPUT );
pinMode( 15, OUTPUT );
digitalWrite( 16, 1 );
digitalWrite( 12, 1 );
digitalWrite( 15, 1 );
delay( 100 );
BlynkEdgent.begin();
}
unsigned long value = 0;
int st = 0;
void loop() {
BlynkEdgent.run();
if ( millis() - value >= 2000 ){
value = millis();
st = !st;
digitalWrite(2, st );
Serial.println( st );
digitalWrite( 15, st );
}
}
If you take a look at the settings.h tab in the ESP8266 edgent example, you’ll see that it defines the pins used for the onboard LED, depending on the board type you chose in the .ino file.
All NodeMCUs that I’ve come across have an LED attached to GPIO2, and some also have one attached to GPIO16.
The settings.h file seems to expect an RGB LED attached to D8, D7 and D6 ( GPIOs 15,13 & 12) and there’s no mention of the actual LED on GPIO2…
I also paid attention to this. The LED in my board is on gpo2. But the changes you suggested did not help. D8 - does not work. Although D6, D7 work great anyway.