Reply To: LED bleibt dunkel

Forums Advent Calender 2016 LED bleibt dunkel Reply To: LED bleibt dunkel

#1714
holzmann
Participant

Hallo,
du kannst mit:

/*
Blynk 1: LED
Change ssid, password and token
*/

char ssid[] = "";
char password[] = "";
char token[] = "";

//#define BLYNK_DEBUG
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266_SoftSer.h>
#include <BlynkSimpleShieldEsp8266_SoftSer.h>

// Set NanoESP Serial object
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(11, 12); // RX, TX
#define RED_LED 9

ESP8266 wifi(EspSerial);

void setup()
{
  // Set console baud rate
  Serial.begin(19200);
  EspSerial.begin(19200);
  pinMode(RED_LED, OUTPUT);

  Blynk.begin(token, wifi, ssid, password);
}

void loop()
{
  digitalWrite(RED_LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);                       // wait 
 Blynk.run();
  digitalWrite(RED_LED, LOW);    // turn the LED off by making the voltage LOW
  delay(100);                       // wait 
}

die rote LED schnell bliinken lassen.
Ansonsten mal die LED um 180° drehen.