Respuesta a: SuperStar controlada por internet

#3570

El reto está casi casi superado. Una placa ESP8266, cinco leuros, y la aplicación gratuita Blynk para Iphone o Android.

El vídeo lo subirán Los Supertacañones en breve. Controlar un servo y dos diodos desde el teléfono via internet.

Pego aquí el código por si os interesa. 73 de Juan 37LRCB.

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include

#include

#include

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = “Escribe aqui tu autorizacion de Blynk”;

// Your WiFi credentials.

// Set password to “” for open networks.

char ssid[] = “Tu nmbre de red”;

char pass[] = “Tu password”;

Servo servo;

BLYNK_WRITE(V3) {

servo.write(param.asInt());

}

void setup() {

// Debug console Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

// You can also specify server:

//Blynk.begin(auth, ssid, pass, “blynk-cloud.com”, 8442);

//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);

servo.attach(15); // 15 means D8 pin of ESP8266

}

void loop()

{

Blynk.run(); // You can inject your own code or combine it with other sketches.

Blynk.virtualWrite(V1, 55);

Blynk.virtualWrite(V2, HIGH);

}