Hey guys,
As a beginner I tried every code I found, but I had no success for following project:
- I want to connect my NodeMCU with my home wifi. | DONE (led is blinking by pressing a button. also with a virtual pin)
- I want to stear with two buttons 4 leds. | NO PROGESS
Problems:
I can not use one button for two pins
I can not program one vitural pin to high to pins to the same time.
here is my current code.
I’m sure you will laugh now, but it is impossible for me in the moment.
Please help! Thx Sev
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "0123556";
char ssid[] = "xxxxxxxxxxxxx";
char pass[] = "xxxxxxxxxxxxx";
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
BLYNK_WRITE(V0)
{
int i=param.asInt();
if (i==1)
{
digitalWrite(D8, HIGH);
digitalWrite(D6, HIGH);
}
else
{
digitalWrite(D8, LOW);
digitalWrite(D6, LOW);
}
}
void loop()
{
Blynk.run();
}