Created
November 28, 2015 02:10
-
-
Save wero1414/b3ad39dd328e369cb5ea to your computer and use it in GitHub Desktop.
asdfghjrawñt eargp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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