shivasiddharth / iotwemos Goto Github PK
View Code? Open in Web Editor NEWWemos D1 Mini Projects
Wemos D1 Mini Projects
sir i want to add static ip to it can you tell me how can i do it
C:\Users\sexyy\Downloads\16 device alexa control\sketch_feb03a\sketch_feb03a.ino: In function 'void setup()':
sketch_feb03a:161: error: 'class fauxmoESP' has no member named 'onMessage'
fauxmo.onMessage(callback);
^
exit status 1
'class fauxmoESP' has no member named 'onMessage'
...i use NODEMCU
the light is to dimm. how increse brightness?
How many switches can i add to ESP?
#include<ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
const char* ssid = "DLink77"; //Set your wifi network name(ssid)
const char* password = "ajith3615"; //Set your router password
int Device1 = D1;
int Device2 = D2;
int Device3 = D3;
int Device4 = D4;
WiFiServer server(80);
void setup() {
Serial.begin(115200); //change according to your com port baud rate
delay(10);
//Declare device pins
pinMode(Device1, OUTPUT);
digitalWrite(Device1, LOW);
pinMode(Device2, OUTPUT);
digitalWrite(Device2, LOW);
pinMode(Device3, OUTPUT);
digitalWrite(Device3, LOW);
pinMode(Device4, OUTPUT);
digitalWrite(Device4, LOW);
// Connect to WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Start the server
server.begin();
Serial.println("Server started");
// Print the IP address
Serial.print("Use this URL : ");
Serial.print("http://");
Serial.print(WiFi.localIP());
Serial.println("/");
}
void loop() {
// Check for an active client
WiFiClient client = server.available();
if (!client) {
return;
}
// Wait until client responds
Serial.println("new client");
while (!client.available()) {
delay(1);
}
// Read client request
String request = client.readStringUntil('\r');
Serial.println(request);
client.flush();
// Check device request
if (request.indexOf("/Device1=ON") != -1) {
digitalWrite(Device1, HIGH);
}
if (request.indexOf("/Device1=OFF") != -1) {
digitalWrite(Device1, LOW);
}
if (request.indexOf("/Device2=ON") != -1) {
digitalWrite(Device2, HIGH);
}
if (request.indexOf("/Device2=OFF") != -1) {
digitalWrite(Device2, LOW);
}
if (request.indexOf("/Device3=ON") != -1) {
digitalWrite(Device3, HIGH);
}
if (request.indexOf("/Device3=OFF") != -1) {
digitalWrite(Device3, LOW);
}
if (request.indexOf("/Device4=ON") != -1) {
digitalWrite(Device1, HIGH);
}
if (request.indexOf("/Device4=OFF") != -1) {
digitalWrite(Device1, LOW);
}
// Return the client response
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println(""); // do not forget this one
client.println("");
client.println("");
//HTML code for controling devices from browser
client.println("
");
client.println("Device 1: <a href="/Device1=ON">ON and <a href="/Device1=OFF">OFF
");
client.println("
");
client.println("Device 2: <a href="/Device2=ON">ON and <a href="/Device2=OFF">OFF
");
client.println("
");
client.println("Device 3: <a href="/Device3=ON">ON and <a href="/Device3=OFF">OFF
");
client.println("
");
client.println("Device 4: <a href="/Device3=ON">ON and <a href="/Device4=OFF">OFF
");
client.println("
");
client.println("");
client.println("");
delay(1);
Serial.println("Client disconnected");
Serial.println("");
}
My echo dot 3 can't discover this devices
installing 3.1 solved it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.