Skip to content

Instantly share code, notes, and snippets.

@wero1414
Created November 28, 2015 02:10
Show Gist options
  • Save wero1414/b3ad39dd328e369cb5ea to your computer and use it in GitHub Desktop.
Save wero1414/b3ad39dd328e369cb5ea to your computer and use it in GitHub Desktop.
asdfghjrawñt eargp
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMesh.h>
ESP8266WiFiMesh mesh_node = ESP8266WiFiMesh(ESP.getChipId(), manageRequest);
String manageRequest(String request)
{
/* Print out received message */
Serial.print("Recibi:");
Serial.println(request);
/* return a string to send back */
return String("Hola mundo");
}
void setup()
{
Serial.begin(115200);
delay(10);
pinMode(5,INPUT_PULLUP);
Serial.println();
Serial.println();
Serial.println("Setting up mesh node...");
/* Initialise the mesh node */
mesh_node.begin();
}
void loop()
{
while(digitalRead(5)){
mesh_node.acceptRequest();
}
mesh_node.attemptScan("Prende el LED guapurita");
Serial.println("Prendera el LED");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment