Arduino and esp8266

Hi, I am new to arduino and creating project where i connected arduino uno and esp8266 as follows: UNO --- ESP8266 RX ----- RX TX ----- TX GND --- GND 3.3V --- VCC 3.3V --- CH_PD I power arduino uno and it is working fine. i checked by uploading blink program. when i connect esp8266 to arduino uno and open serial monitor i am getting some garbage text which is shown in below screen shot. also when i connect esp8266 to uno the orange light is continuously blinking. no action on entering AT command in serial monitor. some one please let me know how to get it work.

Posted by sayedfar 3 years ago  |  last reply 3 years ago


ESP8266 WiFi Module

You need a separate grouping for this module under Technology This is a Microprocessor running at 80Mhz to 160 Mhz  with 512 kB to 4 Mb of program memory It costs $3 and is programmed with various languages compiled to machine hex and uploaded by a variety of programs to run entirely on its own with a 3.3Volt power supply . It connects to your modem , acts as a modem , serves web pages and sends to web pages and a whole lot of other stuff I have not used yet See here in the wiki for more detail   http://www.esp8266.com/wiki/doku.php

Posted by tytower 3 years ago  |  last reply 1 year ago


ESP8266 MEMORY ADDRESS

Hallo guys I have ESP8266 programmed to operate at MODBUS TCP / IP and PLC (LSIS) connected to router by Ethernet MODBUS. I made connection between them successfully (using P2P service found in PLC) through router, but the connection produce error. P2P service found to make connection between LSIS devices and other devices. This service requires inter the read and write memory address for ESP8266 with condition that the address must has 5 digit. Knowing that I use simple diode connection on GPIO pin-14. The problem is when I search for ESP8266 memory map addresses, I find it (0x60000360) 8 digit and this return error from PLC side. Please can any one help me?

Asked by methaq_ali 5 weeks ago  |  last reply 4 weeks ago


ESP8266 + NRF24L01 + Arduino system?

Hi everyone, So, I'm pretty new to the esp8266, but have some experience with arduino (I'm certainly no master however). I'm working on a project that uses an esp8266 and a nrf24l01 radio module to transmit small packets of data to a 'base' module that is an arduino and another nrf24l01. I'm having some difficulties figuring out how to use the nrf24l01 with the esp8266, so I was wondering if anyone knows of any good libraries or tutorials or anything that might help me. I don't know any Lua at all, so it would need to run through the arduino ide, that's what I've used so far to program the esp8266. Any help at all would be greatly appreciated and I can try to answer any questions you might have. Oh, and it would be great if you could explain stuff in really simple terms, I'm still in highschool and don't have a very expansive technical vocabulary  :D Thank you  ~Dudes

Posted by dudes 2 years ago  |  last reply 2 years ago


Adding a new category for the ESP8266

Hey Instructables, Not sure what your criteria are for adding a new category? I'm suggesting you consider a category for the ESP8266. I'm a real Arduino and Raspberry Pi fan and I can see that the ESP8266 is coming on gangbusters. I understand if you added a new category in Technology for every piece of hardware that came along the categories would loose their effectiveness, so I'll leave my suggestion in your capable hands. Cheers, Steve

Posted by lafontas 3 years ago  |  last reply 3 years ago


ESP8266 version 13 DIP switch

Hi, I bought a kit that uses an ESP8266 Arduino expansion board (shield) that has a version 13 ESP8266 module on it. That expansion board is not a standard ESP8266 board. It has an unusual 2-pole DIP switch on it that can be set to "ON" or "1-2". I need to understand what the 2-pole DP switch does and I need to understand the electrical connections it is connected to. There are many instructables about the standard ESP8266, but I cannot find any details about that DIP switch in a version 13 ESP8266 arduino expansion board. Can you please tell me where the DIP switch connects to and why it is needed. Thank you

Posted by agribot 1 year ago


Use 12v 1a supply with esp8266

Hi, I'd like to use a 12v 1A supply with an Esp8266 (with usb mode) and a Module Rele 5v. Is it possible? Can you help me? Thank you!

Asked by LuigiSet 2 months ago


Problem using ESP8266-01 wifi module.

I want to make a home automation project using ESP8266-01, but the problem is that my module is not working correctly as I see the videos or articles, It's power light glowing very dim and also gives error while uploading the code(using Arduino IDE). Is that module is burned out or there is a problem with the power supply?Please help me .....

Asked by AliR223 1 year ago  |  last reply 1 year ago


WiFi Radio / MP3 Player with ESP8266

Hello everyone, I'd like to make a new project: Reading in an usb stick with .mp3 files, and playing them. Moreover to swtich from mp3 playing to a wifi radio station. Basically I'd like to use a nodemcu ESP8266 for this project. This was my idea (s. Attachment) My questions: Does it work? Is the controller of the ESP8266 powerful enought to fit these requirements? Do you have improvements for this project? Best regards, Julian

Posted by julianpe 1 year ago  |  last reply 1 year ago


ESP8266 has red led but not active after flashing

Hi Guys.I've been tinkering with ESP8266 for a couple of weeks now. It worked before the weekend, and now with only some code changes it stopped (but it does not seem to crash).My project: Tabletop clock with weather. For now I'm trying to get weather from openweather API via ESP8266. I actually managed to do the request, and now was trying to parse JSON, and at this point it stopped working.My setup: USB CP2104 CP2102 - UART TTL flashing stick Arduino Uno - only provides power to ESP (see below), RX/TX not connected.ESP8266 CH_PD and VCC powered from Arduino Uno 3.3V pin GPIO2 is connected to GND. The rest of pins are connected to the flashing stick.Problem: 1. I run flashing from Arduino IDE. 2. Compilation is ok, uploading is ok on 115200 baud, serial monitor is also 115200. 3. Sketch uploading progress is visible in IDE terminal, blue LED on ESP is rapidly blinking while uploading. 4. After upload is finished, I see something like "tail 8, checksum ... " in the serial monitor.Then I do not see anything in serial monitor. The red LED on ESP is very weak after flashing - the last time I tried to flash it - it is not visible with the lights on. The ESP does not connect to router (according to router info).Also one strange sideeffect - after flashing, wi-fi drops on my laptop.What may be the issue? Thanks.

Asked by beshur 11 months ago


ESP8266 wifi module data logger? Answered

​hello everyone, can anybody do a simpler project with this? I just want to collect data using arduino Analog0 input with an LDR photoresistor. collect the data and simply post it on Thingspeak ?!?! . all the examples I find are very complicated and include libraries. I need my project to be much simpler. just read some data from the analog sensor and display the value on the cloud. . can anybody please help me with this? I have updated the firmware on my ESP8266 and I can connect to my house network using the CoolTerm software. . any help is highly appreciated !!! thank you, akin . useful links 1. http://www.electrodragon.com/w/Wi07c 2. http://www.esp8266.com/ 3. http://www.espruino.com/ESP8266 4. https://nurdspace.nl/ESP8266 5. http://hackaday.com/tag/esp8266/

Asked by Akin Yildiz 4 years ago  |  last reply 4 years ago


esp8266 WiFi module - stand alone?

So I've been looking at this esp8266 wifi module, which seems to be a popular toy for Arduino users.  I myself am one of those Arduino users and so I bought a couple of these to play around with.  So far they work great with the Arduino, but I read somewhere, I think it was make.com, that these modules can actually be programmed to be used without the Arduino or other external microcontrollers.  I simply wondered if this was in fact true, since I can't seem to find any evidence of it being done.  If it is true, does anyone know of any good tutorials or instructions on how to do it?  I just want to be able to turn on and off a single LED via wifi without using an Arduino or other external microcontroller.  Any tips, links, suggestions would be very welcome.   Thanks ~Dudes

Posted by dudes 3 years ago  |  last reply 3 years ago


Write output on registery inside ESP8266

Could any one help me please? I have the following code to make MODBUS tcp/ip(its work good) the other issue in the code is ultrasonic sensor (trig on D1& echo on D2 and output distance on serial port)I want to write distance on one of memory register say (3). I use the command "digitalWrite(distance, MBHoldingRegister[3] )" its fail then I use analogWrite also fail what's the solution?#include #define trigPin D1#define echoPin D2#define analog_output D5float distance;long duration;int dataIn;int m = 0;int h = 0;int t = 0;const char* ssid = "MH_Ext";const char* password = "74375325";int ModbusTCP_port = 502;//////// Required for Modbus TCP / IP /// Requerido para Modbus TCP/IP /////////#define maxInputRegister 20#define maxHoldingRegister 20#define MB_FC_NONE 0#define MB_FC_READ_REGISTERS 3 //implemented#define MB_FC_WRITE_REGISTER 6 //implemented#define MB_FC_WRITE_MULTIPLE_REGISTERS 16 //implemented// MODBUS Error Codes//#define MB_EC_NONE 0#define MB_EC_ILLEGAL_FUNCTION 1#define MB_EC_ILLEGAL_DATA_ADDRESS 2#define MB_EC_ILLEGAL_DATA_VALUE 3#define MB_EC_SLAVE_DEVICE_FAILURE 4// MODBUS MBAP offsets//#define MB_TCP_TID 0#define MB_TCP_PID 2#define MB_TCP_LEN 4#define MB_TCP_UID 6#define MB_TCP_FUNC 7#define MB_TCP_REGISTER_START 8#define MB_TCP_REGISTER_NUMBER 10byte ByteArray[260];unsigned int MBHoldingRegister[maxHoldingRegister];//////////////////////////////////////////////////////////////////////////WiFiServer MBServer(ModbusTCP_port);void setup() {pinMode(14, OUTPUT);pinMode(trigPin, OUTPUT);pinMode(echoPin, INPUT);Serial.begin(9600);delay(100) ;WiFi.begin(ssid, password);delay(100) ;Serial.println(".");while (WiFi.status() != WL_CONNECTED) {delay(500);Serial.print(".");}MBServer.begin();Serial.println("Connected ");Serial.print("ESP8266 Slave Modbus TCP/IP ");Serial.print(WiFi.localIP());Serial.print(":");Serial.println(String(ModbusTCP_port));Serial.println("Modbus TCP/IP Online");}void loop() {distance = getDistance();Serial.println(distance);delay(1000);// Check if a client has connected // Modbus TCP/IPWiFiClient client = MBServer.available();if (!client) {return;}boolean flagClientConnected = 0;byte byteFN = MB_FC_NONE;int Start;int WordDataLength;int ByteDataLength;int MessageLength;// Modbus TCP/IPwhile (client.connected()) {if(client.available()){flagClientConnected = 1;int i = 0;while(client.available()){ByteArray[i] = client.read();i++;}client.flush();///// code here --- codigo aqui///////// Holding Register [0] A [9] = 10 Holding Registers Escritura///////// Holding Register [0] A [9] = 10 Holding Registers Writing/// Enable Output 14digitalWrite(14, MBHoldingRegister[14] );digitalWrite(distance, MBHoldingRegister[12] );//// end code - fin//// rutine Modbus TCPbyteFN = ByteArray[MB_TCP_FUNC];Start = word(ByteArray[MB_TCP_REGISTER_START],ByteArray[MB_TCP_REGISTER_START+1]);WordDataLength = word(ByteArray[MB_TCP_REGISTER_NUMBER],ByteArray[MB_TCP_REGISTER_NUMBER+1]);}// Handle requestswitch(byteFN) {case MB_FC_NONE:break;case MB_FC_READ_REGISTERS: // 03 Read Holding RegistersByteDataLength = WordDataLength * 2;ByteArray[5] = ByteDataLength + 3; //Number of bytes after this one.ByteArray[8] = ByteDataLength; //Number of bytes after this one (or number of bytes of data).for(int i = 0; i < WordDataLength; i++){ByteArray[ 9 + i * 2] = highByte(MBHoldingRegister[Start + i]);ByteArray[10 + i * 2] = lowByte(MBHoldingRegister[Start + i]);}MessageLength = ByteDataLength + 9;client.write((const uint8_t *)ByteArray,MessageLength);byteFN = MB_FC_NONE;break;case MB_FC_WRITE_REGISTER: // 06 Write Holding RegisterMBHoldingRegister[Start] = word(ByteArray[MB_TCP_REGISTER_NUMBER],ByteArray[MB_TCP_REGISTER_NUMBER+1]);ByteArray[5] = 6; //Number of bytes after this one.MessageLength = 12;client.write((const uint8_t *)ByteArray,MessageLength);byteFN = MB_FC_NONE;break;case MB_FC_WRITE_MULTIPLE_REGISTERS: //16 Write Holding RegistersByteDataLength = WordDataLength * 2;ByteArray[5] = ByteDataLength + 3; //Number of bytes after this one.for(int i = 0; i < WordDataLength; i++){MBHoldingRegister[Start + i] = word(ByteArray[ 13 + i * 2],ByteArray[14 + i * 2]);}MessageLength = 12;client.write((const uint8_t *)ByteArray,MessageLength);byteFN = MB_FC_NONE;break;}}}//===== getDistance - Custom Functionint getDistance() {// Clears the trigPindigitalWrite(trigPin, LOW);delayMicroseconds(2);// Sets the trigPin on HIGH state for 10 micro secondsdigitalWrite(trigPin, HIGH);delayMicroseconds(10);digitalWrite(trigPin, LOW);// Reads the echoPin, returns the sound wave travel time in microsecondsduration = pulseIn(echoPin, HIGH);// Calculating the distancedistance = duration * 0.034 / 2; // distance in cmreturn distance;}

Asked by methaq_ali 4 weeks ago


ESP8266 Huzzah automated connection protocol

Hello guys! I would like to make a very small android app (or anything easy to use) so that at first :1. The ESP functions as a Wifi router in a local area (so no internet access) and allows anyone using a phone for example to connect to its network to enter the credintials of his home wifi2. The ESP board automatically changes to Wifi client and connects to the given SSID/ PAssword entered by the user. This would allow people to change ssid connections on a different wifi access point even if they don't know how to use any IDE. If anyone knows a tutorial or another topic with the same question i'd be happy to know ! Thanks

Posted by FlorianL17 11 months ago


Using ESP8266-01 WiFi module with Arduino

Hi! Need some help with coding again I'm trying to just eliminate the wire connectivity which used for serial read by PC, by introducing a simple ESP8266-01 module. Can anyone give me some hand with the coding part at where I need to transfer all my serial data to my browser?

Posted by PramithM 2 years ago


Arduino/ESP8266/servo noise when idle

Hello everyone My project involves a robot with LEDs, servos and an Arduino with a Sparkfun ESP8266 shield on top. Everything else works fine, I send web requests to the robot and LEDs are blinking or the servos are moving. The problem is that when idle I have noise on the servo. I have tried  1. Pull-up and pull-down resistors 2. Providing external power to the servos 3. Putting an aluminium foil between Arduino and the shield and the problem persists Commenting out parts of my code I isolated that the noise appeared upon uncommenting this part of my code void serverDemo(){ ESP8266Client client = server.available(500); } but I cannot understand why.  Could you please propose me any idea? Below I have the entire code #include #include #include const char mySSID[] = "xxxx"; const char myPSK[] = "xxxx"; ESP8266Server server = ESP8266Server(80); Servo myservo1; Servo myservo2; int pos = 0;    // variable to store the servo position int pos2 = 180; int led1 = 12; int led2 = 13; const String html = "HTTP/1.1 200 OK\r\n" "Content-Type: text/html\r\n" "Connection: close\r\n\r\n" "\r\n" "\r\n" "\r\n"; void setup(){ Serial.begin(9600); initializeESP8266(); connectESP8266(); displayConnectInfo(); serverSetup(); myservo1.attach(11);  myservo2.attach(10);  pinMode(led1, OUTPUT);     pinMode(led2, OUTPUT); //testing myservo1.write(45);   delay(15); myservo1.write(80);       } void loop(){ serverDemo(); } void initializeESP8266(){ int test = esp8266.begin(); if (test != true) { Serial.println(F("Error talking to ESP8266.")); errorLoop(test); } Serial.println(F("ESP8266 Shield Present"));} void connectESP8266(){ int retVal = esp8266.getMode(); if (retVal != ESP8266_MODE_STA) { retVal = esp8266.setMode(ESP8266_MODE_STA); if (retVal < 0) { Serial.println(F("Error setting mode.")); errorLoop(retVal); } } Serial.println(F("Mode set to station")); retVal = esp8266.status(); if (retVal <= 0) { Serial.print(F("Connecting to ")); Serial.println(mySSID); retVal = esp8266.connect(mySSID, myPSK); if (retVal < 0) { Serial.println(F("Error connecting")); errorLoop(retVal); } }} void displayConnectInfo(){ char connectedSSID[24]; memset(connectedSSID, 0, 24); int retVal = esp8266.getAP(connectedSSID); if (retVal > 0) { Serial.print(F("Connected to: ")); Serial.println(connectedSSID); } IPAddress myIP = esp8266.localIP(); Serial.print(F("My IP: ")); Serial.println(myIP);} void serverSetup(){ server.begin(); Serial.print(F("Server started! Go to ")); Serial.println(esp8266.localIP()); Serial.println();} void errorLoop(int error){ Serial.print(F("Error: ")); Serial.println(error); Serial.println(F("Looping forever.")); for (;;) ;} void serverDemo(){ ESP8266Client client = server.available(500); if (client) { String req; while (client.connected()) { if (client.available()) { String c = client.readStringUntil('\r'); req += c; Serial.println(req); if (req.indexOf("hands") != -1){ hands_up(); } if (req.indexOf("leds") != -1){ leds_flash(); } } } client.print(html); delay(1); client.stop(); } } void leds_flash(){ digitalWrite(led1, HIGH); digitalWrite(led2, HIGH); delay(200); digitalWrite(led1, LOW); digitalWrite(led2, LOW); delay(200); } void hands_up(){ for (pos = 0; pos <= 30; pos += 1) { pos2 = 180 - pos; myservo1.write(pos2);             myservo2.write(pos);             delay(15);                      } for (pos = 30; pos >= 0; pos -= 1) { pos2 = 180 - pos; myservo1.write(pos2);             myservo2.write(pos);             delay(15);                      } } Thank you!

Posted by ManosZ1 1 year ago  |  last reply 1 year ago


Car battery voltage monitor by ESP8266 and email ?

I see there a lot of nice ESP8266 projects around that report stuff via email or SMS, but has anyone seen one that can monitor a cars battery voltage periodically (say twice a day) and report when it gets below 12.0V ? The purpose would be to keep an eye on batteries of cars in storage, or cars in extreme winter conditions, and report a warning on email if it's low via a home WiFi network.

Posted by MartinS103 2 years ago


ITEADLIB_Arduino_WeeESP8266 android response

Im planing to do a project that using Arduino+esp8266 with android device, at first my code was something like this. #include #define DEBUG true SoftwareSerial esp8266(9,10); // make RX Arduino line is pin 2, make TX Arduino line is pin 3.                          // This means that you need to connect the TX line from the esp to the Arduino's pin 2                          // and the RX line from the esp to the Arduino's pin 3 void setup() {   Serial.begin(9600);   esp8266.begin(9600); // your esp's baud rate might be different   pinMode(11,OUTPUT);   digitalWrite(11,LOW);   pinMode(12,OUTPUT);   digitalWrite(12,LOW);   pinMode(13,OUTPUT);   digitalWrite(13,LOW);   pinMode(10,OUTPUT);   digitalWrite(10,LOW);   sendCommand("AT+RST\r\n",2000,DEBUG); // reset module   sendCommand("AT+CWMODE=1\r\n",1000,DEBUG); // configure as access point   sendCommand("AT+CWJAP=\"Arsalan Wifi\",\"arsalan123\"\r\n",3000,DEBUG);   delay(10000);   sendCommand("AT+CIFSR\r\n",1000,DEBUG); // get ip address   sendCommand("AT+CIPMUX=1\r\n",1000,DEBUG); // configure for multiple connections   sendCommand("AT+CIPSERVER=1,8080\r\n",1000,DEBUG); // turn on server on port 80   Serial.println("Server Ready"); } void loop() {   if(esp8266.available()) // check if the esp is sending a message   {     if(esp8266.find("+IPD,"))     {      delay(1000); // wait for the serial buffer to fill up (read all the serial data)      // get the connection id so that we can then disconnect      int connectionId = esp8266.read()-48; // subtract 48 because the read() function returns                                        // the ASCII decimal value and 0 (the first decimal number) starts at 48      esp8266.find("pin="); // advance cursor to "pin="      int pinNumber = (esp8266.read()-48); // get first number i.e. if the pin 13 then the 1st number is 1      int secondNumber = (esp8266.read()-48);      if(secondNumber>=0 && secondNumber<=9)      {       pinNumber*=10;       pinNumber +=secondNumber; // get second number, i.e. if the pin number is 13 then the 2nd number is 3, then add to the first number      }      digitalWrite(pinNumber, !digitalRead(pinNumber)); // toggle pin         String content;      content = "چراغ ";      content += pinNumber;      content += " is ";      if(digitalRead(pinNumber))      {        content += "ON";      }      else      {        content += "OFF";      }      sendHTTPResponse(connectionId,content);      // make close command      String closeCommand = "AT+CIPCLOSE=";      closeCommand+=connectionId; // append connection id      closeCommand+="\r\n";      sendCommand(closeCommand,1000,DEBUG); // close connection      Serial.print(connectionID);     }   } } /* * Name: sendData * Description: Function used to send data to ESP8266. * Params: command - the data/command to send; timeout - the time to wait for a response; debug - print to Serial window?(true = yes, false = no) * Returns: The response from the esp8266 (if there is a reponse) */ String sendData(String command, const int timeout, boolean debug) {     String response = "";     int dataSize = command.length();     char data[dataSize];     command.toCharArray(data,dataSize);     esp8266.write(data,dataSize); // send the read character to the esp8266     if(debug)     {       Serial.println("\r\n====== HTTP Response From Arduino ======");       Serial.write(data,dataSize);       Serial.println("\r\n========================================");     }     long int time = millis();     while( (time+timeout) > millis())     {       while(esp8266.available())       {         // The esp has data so display its output to the serial window         char c = esp8266.read(); // read the next character.         response+=c;       }      }     if(debug)     {       Serial.print(response);     }     return response; } /* * Name: sendHTTPResponse * Description: Function that sends HTTP 200, HTML UTF-8 response */ void sendHTTPResponse(int connectionId, String content) {      // build HTTP response      String httpResponse;      String httpHeader;      // HTTP Header      httpHeader = "HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\n";      httpHeader += "Content-Length: ";      httpHeader += content.length();      httpHeader += "\r\n";      httpHeader +="Connection: close\r\n\r\n";      httpResponse = httpHeader + content + " "; // There is a bug in this code: the last character of "content" is not sent, I cheated by adding this extra space      sendCIPData(connectionId,httpResponse); } /* * Name: sendCIPDATA * Description: sends a CIPSEND=, command * */ void sendCIPData(int connectionId, String data) {    String cipSend = "AT+CIPSEND=";    cipSend += connectionId;    cipSend += ",";    cipSend +=data.length();    cipSend +="\r\n";    sendCommand(cipSend,1000,DEBUG);    sendData(data,1000,DEBUG); } /* * Name: sendCommand * Description: Function used to send data to ESP8266. * Params: command - the data/command to send; timeout - the time to wait for a response; debug - print to Serial window?(true = yes, false = no) * Returns: The response from the esp8266 (if there is a reponse) */ String sendCommand(String command, const int timeout, boolean debug) {     String response = "";     esp8266.print(command); // send the read character to the esp8266     long int time = millis();     while( (time+timeout) > millis())     {       while(esp8266.available())       {         // The esp has data so display its output to the serial window         char c = esp8266.read(); // read the next character.         response+=c;       }      }     if(debug)     {       Serial.print(response);     }     return response; } but then i chose to use library code for esp8266 and i use this link ITEADLIB_Arduino_WeeESP8266 now i have problem that i dont know how can i get a response message back to my android device, also this is my code using library, (i know its really noobish code cuz im new but... it work atleast :D ) #include #include "ESP8266.h" #include #include LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //moshakhas kardane pin haye LCD SoftwareSerial mySerial(7, 8); // moshakhas kardane pin haye wifi ESP8266 wifi(mySerial); String msg; #define SSID        "Arsalan Wifi"  //UserName wifi #define PASSWORD    "arsalan123"  //Password wifi String pinnum; int count= 0; void setup() {   lcd.begin(20, 4);       Serial.begin(9600);   pinMode(9,OUTPUT);   digitalWrite(9,HIGH);   String IP;   Serial.print("setup begin\r\n");   lcd.print("Connecting to Wifi");   delay(3000);   Serial.print("FW Version: ");   //  Serial.println(wifi.getVersion().c_str());         if (wifi.setOprToStation()) {         Serial.print("to station ok\r\n");     } else {         Serial.print("to station err\r\n");     }     if (wifi.joinAP(SSID, PASSWORD)) {         Serial.print("Join AP success\r\n");         Serial.print("IP: ");               Serial.println(wifi.getLocalIP().c_str());         IP = wifi.getLocalIP().c_str();         lcd.setCursor(0, 1);         lcd.print("Join AP success");         lcd.setCursor(0, 2);         lcd.print("IP: "+IP);     } else {         Serial.print("Join AP failure\r\n");         lcd.setCursor(0, 1);         lcd.print("Join AP failure");         lcd.setCursor(0, 2);         lcd.print("Contact Administrator");     }      if (wifi.enableMUX()) {         Serial.print("multiple ok\r\n");     } else {         Serial.print("multiple err\r\n");     }     if (wifi.startTCPServer(80)) {         Serial.print("start tcp server ok\r\n");         lcd.setCursor(0, 3);         lcd.print("Server Ready");     } else {         Serial.print("start tcp server err\r\n");         lcd.setCursor(0, 3);         lcd.print("Server Setup Fail");     }     if (wifi.setTCPServerTimeout(10)) {         Serial.print("set tcp server timout 10 seconds\r\n");     } else {         Serial.print("set tcp server timout err\r\n");     }           Serial.print("setup end\r\n"); } void loop() {    uint8_t buffer[128] = {0};     uint8_t mux_id;     uint32_t len = wifi.recv(&mux;_id, buffer, sizeof(buffer), 100);     if (len > 0) {         Serial.print("Status:[");         Serial.print(wifi.getIPStatus().c_str());         Serial.println("]");                 Serial.print("Received from :");         Serial.print(mux_id);         Serial.print("[");         for(uint32_t i = 0; i < len; i++) {             Serial.print((char)buffer[i]);             msg = "";             msg += ((char)buffer[i]);                         if (msg == "p")             {               count=1;                                         }                          if (msg != "p" & count ==1)             {               if(msg =="i")               {                                 count++;               }               else               {                                 count = 0;               }             }             if (msg !="i" & count ==2)             {               if (msg =="n")               {                 count++;               }               else               {                 count = 0;               }             }             if (msg !="n" & count ==3)             {               if(msg=="=")               {                 count++;                               }               else               {                 count = 0;               }             }             if (msg != "=" & count==4)             {               Serial.print(msg);               pinnum =msg;               count = 0;             }                     }         Serial.print(pinnum);         Serial.print("]\r\n");         int pin = pinnum.toInt();         Serial.print(pin);         digitalWrite(pin, !digitalRead(pin)); // toggle pin            String content;      content = "چراغ ";      content += pinnum;      content += " is ";           if(digitalRead(pin))      {        content += "ON";      }      else      {        content += "OFF";      }                 if(wifi.send(mux_id, buffer, len)) {             Serial.print("send back ok\r\n");         } else {             Serial.print("send back err\r\n");         }                 if (wifi.releaseTCP(mux_id)) {             Serial.print("release tcp ");             Serial.print(mux_id);             Serial.println(" ok");         } else {             Serial.print("release tcp");             Serial.print(mux_id);             Serial.println(" err");         }                 Serial.print("Status:[");         Serial.print(wifi.getIPStatus().c_str());         Serial.println("]");     }   }

Asked by Arsalan Ahmadi 3 years ago  |  last reply 3 years ago


Stream video from OV7670 18 pins using arduino uno

I purchased OV7670 camera module and i stuck with it that how i connect this module having 18 pins to arduino uno. From last 5 days i am in search of the help but no forum can help me till yet. This is my final sem project and if this module will not work them my project will be considered as incomplete. So please help me out because i dont know even how to connect this ov7670 with 18 pin to arduino uno and to stream video live. modules i purchased are as follows: 1. Arduino Uno 2. Ov7670 Camera Module C4B1 3. esp8266 4. sd card adapter

Posted by AdityaA24 3 years ago  |  last reply 3 years ago


logging ESP8266 data of(BMP180+DHT22+Ublox GPS Neo 6m +hc04 ultrasonic sensor)

Hi instructables , i'm just starter in this filed i just need Sketch for logging ESP8266 data of(BMP180+DHT22+Ublox GPS Neo 6m +hc04 ultrasonic sensor) all data in separeted files  i found in Net GPS neo logging but for the authers no ..please if someone can help me i will be very thankful 

Posted by Slash09 1 year ago  |  last reply 1 year ago


Shield:FAIL problem in ESP8266-01 with Arduino UNO

I have been working on a Security System project wherein I should get an email if the PIR sensor detects any human presence. I have used an Arduino UNO, ESP8266-01 WiFi module and a PIR sensor. Power supply: Arduino is powered through the USB connection of desktop and ESP8266-01 is powered through the 3.3V pin of Arduino UNO and I have not faced any problem with that 3.3V connection of Arduino. The connection between Arduino UNO and ESP8266-01 are as follows: Arduino UNO ESP8266-01 Rx  Rx Tx  Tx 3.3V  CH_PD & VCC GND  GND   GPIO0 and GPIO2 left open. After successfully uploading the 'BareMinimum' code as found in 'File>Examples>Basics' of Arduino IDE, the ESP8266 is able to communicate correctly i.e. connecting to a wifi network or serving as an access point via SERIAL MONITOR.The ESP8266-01 displays '0018000902-AI03' as the firware version when I type AT+GMR in the serial monitor of Arduino IDE v1.6.8 Then I created an account on https://temboo.com/ and used the 'SendEmail' choreo as found under 'Google>Gmail>SendEmail'. I selected the 'Arduino' option in one tab and 'Arduino Wifi' option in another tab.I then entered the required details including the 'App specific password' and I was able to successfully run the choreo. Problem: I was able to successfully upload the code  to my Arduino UNO that was generated by Temboo. But after uploading the code, when I'm opening my SERIAL MONITOR window from Arduino IDE a message "Shield:FAIL" is being displayed. I'm not able to communicate with the ESP8266 any further. But if I upload the BareMinimum code again, then ESP8266 works normally. I'm a newbie and dont know much about the programming of Arduino though some basics of C are clear.Please if anyone can help me with this, I would be very grateful. The code has been attached.

Posted by JigarF 2 years ago  |  last reply 2 years ago


ESP8266-01 DTH22 5 minute Delay?

Hi, I want to add a DHT22 sensor node to my Openhab setup. A simple way to do this is by using a ESP8266-01; I have a few around. I use the Arduino 1.6.5 IDE since that is what I have. I am having problems with the timing of the loop: I do not need readings every minute or so, 5-10 minutes is more then enough; I do not need that much data. I also want to run the node on batteries in the future so less transmissions is what I want. However, when I use a delay of more then approx. 24000 mils the ESP stops working, lower values are no problem.  I have tried several approaches, none work. Can anyone help me out? The sketch I use is below, you can see what I tried in the comments: #include #include #include const char* ssid = "Yggdrasil"; const char* password = "XXXXXXXXX"; char* topic_t = "openhab/esp8266-1/temp"; char* topic_h = "openhab/esp8266-1/vocht"; char* server = "192.168.X.X"; String clientName = "esp8266-1"; //time peter, idea taken from https://www.safaribooksonline.com/library/view/arduino-cookbook-2nd/9781449321185/ch12.html const long oneSecond = 1000;  // a second is a thousand milliseconds const long oneMinute = oneSecond * 60; const long fiveMinutes = oneMinute * 5; //time peter #define DHTPIN 2 // what pin we're connected to #define DHTTYPE DHT22 // DHT 11 DHT dht(DHTPIN, DHTTYPE,15); WiFiClient wifiClient; PubSubClient client(server, 1883, callback, wifiClient); void callback(char* topic, byte* payload, unsigned int length) { // handle message arrived } void setup() { Serial.begin(115200); delay(10); dht.begin(); Serial.println(); Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address: "); Serial.println(WiFi.localIP()); Serial.print("Connecting to "); Serial.print(server); Serial.print(" as "); Serial.println(clientName); if (client.connect((char*) clientName.c_str())) { Serial.println("Connected to MQTT broker"); Serial.print("Topic is: "); Serial.println(topic_t); Serial.println(topic_h); } else { Serial.println("MQTT connect failed"); Serial.println("Will reset and try again..."); abort(); } } void loop() { float h = dht.readHumidity(); float t = dht.readTemperature(); if (isnan(h) || isnan(t)) { Serial.println("Failed to read from DHT sensor!"); return; } static int counter = 0; String payload ; payload += t; //payload += ":"; //payload += h; String payloadh ; payloadh += h; if (client.connected()){ Serial.print("Sending payload: "); Serial.println(payload); if (client.publish(topic_t, (char*) payload.c_str())) { Serial.println("Publish ok"); } else { Serial.println("Publish failed"); } //peter if (client.connected()){ Serial.print("Sending payload: "); Serial.println(payloadh); if (client.publish(topic_h, (char*) payloadh.c_str())) { Serial.println("Publish ok"); } else { Serial.println("Publish failed"); }} //peter } else { if (client.connect((char*) clientName.c_str())) { Serial.println("Connected to MQTT broker"); Serial.print("Topic is: "); Serial.println(topic_t); Serial.println(topic_h); } } // delay (20000); //WORKS FINE // delay(5*60*1000); //STOPS AFTER FIRST READING AT STARTUP delay(fiveMinutes); // STOPS AFTER FIRST READING AT STARTUP }

Posted by PetervdPol 3 years ago  |  last reply 3 years ago


12V one 1 Channel Relay Module With optocoupler ?

Hello, I bought this 12V one 1 Channel Relay Module With optocoupler by mistake. And I can't figure out how to use it : http://www.ebay.com/itm/172217000566 I was supposed to buy a 5v relay to use it with a nodemcu. But on this one I can't understand the pins. Can someone help ? Thanks.

Asked by RobinT15 1 year ago  |  last reply 1 year ago


Wanted: Someone to setup HomeAssistant for my house

I bought a bunch of Sonoff basics and a Raspi 3 thinking it would be easy to build a home automation system out of this.  I was going to use HomeAssistant.io and my android phone, weekend project, no big. That was 9 months ago and I still just have a pile of Sonoff switches and a kinda booting Raspberry Pi 3. I'm so out of my depth, I don't know what part of it is or isn't working, or if it's just not configured correctly, etc.  I need someone to either walk me through this or give me a bunch of files to download and instructions on how to flash the devices.   Name your price and what you can deliver.

Posted by jongscx 1 year ago


i want want programme to send sensed parameter to cloud by using ardiuno with interfacing esp8266 wifi model plz

Send data like temp. ,air ,humidity parameters which are sensed by sensor by using ardiuno interfacing with esp8266 wifi model 

Asked by sachinpatil 1 year ago  |  last reply 1 year ago


How does the 2-Pole DIP switch on version 13 ESP82266 Arduino expansion board work ?

Hi, I bought a kit that uses a version 13 ESP8266 Arduino expansion board (shield). That version 13 is not a standard ESP8266 board. It has an unusual 2-pole DIP switch on it that can be set to "ON" or "1-2". I need to understand what the 2-pole DP switch does and I need to understand the electrical connections it is connected to. The information on the makers web-site is not very clear.  ( see https://fineshang.gitbooks.io/esp8266-based-serial-wifi-shield-for-arduino-user/content/chapter3.html ) There are many instructables about the standard ESP8266, but I cannot find any details about that DIP switch in a version 13 ESP8266 arduino expansion board. Can you please tell me where the DIP switch on the version 13 board connects to  - the pin connections - and why it is needed. Thank you

Asked by agribot 1 year ago  |  last reply 1 year ago


servo programming on arduino?

Hi, i need a help on my arduino project. i need to make daily program my servo motor on arduino. for example; 23:00 at night ,it should turn right 90';  8:00 at morning, it should turn left(back) 90' also; when i need; i should turn this servo, left-right manually via internet. how can i make this, which component i should use, which commands i should use?  any tutorial, or samples like this? i found some examples on instructables like using servo via internet, Control a Servo over the Internet etc. but i dont know how make this two option together. ps my arduino level: intermediate  tI appreciate any help that you can provide :)

Asked by herneise 2 years ago  |  last reply 2 years ago


Strange behaviour from DS18B20 temperature monitor on ESP8266.

Hi. I have a DS18B20 attached to an ESP8266 which is now feeding temperature info back to a domoticz home automation server hosted on a raspberry pi. I am getting some strange readings and need to work out which part is not working properly. The temperature graph from domoticz is here and the date sheet of ds18b20 I think the lower value is probably accurate as the temperature in my utility room dropped steadily overnight but why does it jump up to over 40 for the majority of the time. Has anyone had this issue with the sensor when it's attached to an ESP8266 or might my problems lie elsewhere? Perhaps easiest to buy another sensor to test and narrow down the options. Thanks for any pointers. Don

Asked by DELETED_MakiY2 1 year ago


HOW DO YOU PROGRAM THE ESP8266-'ESP 01S' ?

Hi, i want to know how to program an esp 01s which is different to an esp 01 upgraded (black). I have looked online but there is nothing telling me how. I know that one difference is that the esp 01s does not have a 'CH_PD' pin, insted it has an 'EN' pin. The first pic is an Esp-01S.The second pic is an Esp-01 (original blue).The third pic is an Esp-01 (upgraded black).If you look carefully there are many re-arrangements.pls reply ASAPthanks---------haadi5584 (the creator).

Asked by haadi5584 3 months ago


IoT server / gateway

Hello Instructables, Like a lot of people lately I'm experimenting with IoT and Home Automation. There are a lot of interesting projects going on, also a lot here at Instructables. But a thing that i run against is the fact of IoT Gateway/server software. On Google I found differed IoT gateways/servers that I wanted to share with you guys. If you have to contribute to my list, please do. All software's have there pros and cons, so more project the better.  - Thingspeak. This is a in the cloud site to witch you can send your sensor data and switch things - Exosite. Pretty similar to Thingspeak - IFTTT. This also a cloud site, with witch you can have your sensor data communicate with other services on the web like google, facebook, twitter - Openhab. Is a open home automation software that runs on the Raspberry Pi, it also has a android app. Unfortunately not that easy to configure. - EasyIoT. Is a pretty new server application, that looks great on the web and phone browser. Still new and in development.  Like I said all projects are have there pros and there cons. If somebody has to contribute to this list, please do. 

Posted by mfaber1 4 years ago  |  last reply 3 years ago


How to power ESP8266 and a circuit that requires 5v, through a single battery?

I am currently working on a wearables project that has an ESP8266 module and a circuit that requires 5v. How can power it through a common battery? I thought of using a 3v coin cell and a HT7750 , but is it right? I want to use minimal components (just to keep its size small) so i would like to use ICs. Also what kind of battery should I use a coin cell/LiPo/one from cell phones(li-ion)?And what kind of recharge system should i use? The schematic is given below.(though it is written 6v but 5v is just fine I tested it with 5v and arduino)  

Asked by levelsandstories 2 years ago  |  last reply 2 years ago


to print a text in thingspeak from my arduino using esp8266

Can i print a text in thingspeak by including it as a string in my arduino code ?? Can i use Google doc or some other platform to print this text ?

Asked by satrujit.mohanty 4 years ago


send mq7 or other sensors data to mysql of local website via NodeMcu-esp8266

Hi guys im doing a project about uploading sensors data to database of my local site in the internet (via NodeMcu) i install nodemcu libraries to my arduino IDE & can upload easily arduino examples and running well, but don't know how can read sensors data and send it to my website host in .txt format or sql to access it in host & show it on my website. I try this process with one mq7 gas sensor to know what should i do and after success that example continue it, but i stuck in first step. please help me MASTER guys:(((

Posted by hadi95126 1 year ago


Arduino D1 WeMos with LabView

Hey, I want to build a project that gets information from the "Temp102" sensor connected to the D1 WeMos Board. This board sends the information received from the sensor via WiFi. I want this information that sends to the computer that has the LabView software and it will display the temperature in a termometer. I have a program that I found in one of the sites that does what I want but with one problem! The program is written for module Esp8266, which is connected to board Arduino Uno and therefore has different classics. I need help converting the classics of module ESP8266 to relevant classes for Board D1 WeMos (This board has ESP8266 but it is built-in so there is no need to set it up in the program). It's important to note that I tried to change it and make a "mix" but without success. I would be happy if someone could check in the program what should be changed, which orders should be replaced? (I believe it's 2 minutes work for anyone who knows) Thank you very much for your help ! I appreciate you very much !! I attached the programs (for arduino and for labview).

Posted by OriaA 1 year ago  |  last reply 1 year ago


security system (not responding after combining ultrasonic sensor code and esp8266 code )

The base of this project is https://www.instructables.com/id/SIMPLE-ARDUINO-ULTRASONIC-SENSOR-DOOR-ALARM-/ &http;://randomnerdtutorials.com/door-status-monitor-using-the-esp8266/ I changed according to my uses from above links I tryed by dividing into two parts one for ultrasonic sensor and other for esp8266 they worked fine while separating ultrasonic and buzzer are working in (Tools and wifi module is working in onlt(Tools when i mix ultrasonic and buzzer nothing happening) any idea here is the code #include #include #include #include #define USE_SERIAL Serial #define trigPin 9 #define echoPin 10 #define piezoPin 8 ESP8266WiFiMulti WiFiMulti; int normalDistance; boolean triggered = false; long duration, distance; void setup() {   USE_SERIAL.begin(115200);   pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);   pinMode(piezoPin, OUTPUT);   long duration, distance; while (millis() < 5000) {   digitalWrite(piezoPin, HIGH);       digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2;         normalDistance = distance;       USE_SERIAL.print("Distance: "); USE_SERIAL.println(distance);         digitalWrite(piezoPin, LOW);    for(uint8_t t = 4; t > 0; t--) {         USE_SERIAL.printf("[SETUP] WAIT %d...\n", t);         USE_SERIAL.flush();         delay(1000); } WiFiMulti.addAP("username", "pass"); } } void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2; USE_SERIAL.print("Distance: "); USE_SERIAL.println(distance); if (distance < normalDistance-5) {       triggered = true;     }     else {         triggered = false;     }     if (triggered) {     tone(piezoPin, 635);     delay(500);     tone(piezoPin, 912);     delay(250);     if((WiFiMulti.run() == WL_CONNECTED)) {         HTTPClient http;         USE_SERIAL.print("[HTTP] begin...\n");                 http.begin("iftt link.........................."); //HTTP         USE_SERIAL.print("[HTTP] GET...\n");         // start connection and send HTTP header         int httpCode = http.GET();         // httpCode will be negative on error         if(httpCode > 0) {             // HTTP header has been send and Server response header has been handled             USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);             // file found at server             if(httpCode == HTTP_CODE_OK) {                 String payload = http.getString();                 USE_SERIAL.println(payload);             }         } else {             USE_SERIAL.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());         }         http.end();     }     } } any idea about whats going on Thanks Hemanth

Posted by hemanth kumar reddy 1 year ago  |  last reply 1 year ago


any one provide me complete code and docs to post temperature on to thing speak using lm35, arduino uno and esp8266

Any one pls male me project on posting sensor data on to thing speak

Posted by iottrainingacpl 1 year ago


Esp 8266 bmp280 and dweet

Iam trying to find a sketch which will dweet temperature pressure using esp8266 and bmp280, is this possible and does such a sketch exist ?. the reason I want to dweet (every 10 minutes ) is because it will be in my caravan and connected to a mifi unit connected to mobile network so very limited data .

Asked by Davidjones24 7 months ago


direct nodeMCU control?

Hi guys this is my first attempt on automation using the nodeMCU lua ESP8266  My goal is to control the gpio via wifi without connecting the node to my home network it should dependent  I have found e bunch of code but it has to be joined to my homework thanks

Asked by Conwyn' 1 year ago  |  last reply 1 year ago


How can I register a physical button press on a webplatform using the Feather HUZZAH with ESP8266?

I am trying to make a cube where 4 of its sides have a physical button which can be pressed. I want to be able to receive what button was pressed and when via long distance. So wherever the cube is, I can read what it sends on a webplatform of any kind.I looked into Adafruit IO, the feather boards and IFTTT automation but can't figure out how to do this still... I have a basic arduino kit already but nothing Adafruit related yet, before I buy more parts I need to make sure I know what I need and how I will make it work. So far my best research has gotten met to the Feather HUZZAH with ESP8266, but I am not skilled in coding are working with circuit boards. All I know is that it has the option for a battery so my cube can function on it's own (which is very important) So the main question is: How can I make a small portable cube with buttons on its side to send the data of those button presses to an online platform wherever it may be used?

Posted by SenneH 10 months ago  |  last reply 10 months ago


How can I register a physical button press on a webplatform using the Feather HUZZAH with ESP8266?

I am trying to make a cube where 4 of its sides have a physical button which can be pressed. I want to be able to receive what button was pressed and when via long distance. So wherever the cube is, I can read what it sends on a webplatform of any kind.I looked into Adafruit IO, the feather boards and IFTTT automation but can't figure out how to do this still...I have a basic arduino kit already but nothing Adafruit related yet, before I buy more parts I need to make sure I know what I need and how I will make it work.So far my best research has gotten met to the Feather HUZZAH with ESP8266, but I am not skilled in coding are working with circuit boards. All I know is that it has the option for a battery so my cube can function on it's own (which is very important)So the main question is: How can I make a small portable cube with buttons on its side to send the data of those button presses to an online platform wherever it may be used?

Asked by SenneH 10 months ago


New comment immediately shows as 8 hours old?

I just posted a comment on this page - https://www.instructables.com/id/Blink-for-ESP8266-native-like-arduino-using-Window/ and immediately it said the comment was 8 hours old? I'm on Windows 10, Google Chrome Version 45.0.2454.101 m My time zone is (UTC) Dublin, Edinburgh, Lisbon, London.

Posted by DonDavio 3 years ago  |  last reply 3 years ago


Arduino Uno Solar Battery Charger ?

Hello everyone. Newbie here.  My project is to make an environmental monitoring system that will be battery powered and charged using solar energy, when the system is not in use. The components I am using are listed below for reference.  Parts List: 1. Solar Panel http://bit.ly/2zimtCj  2. Rechargeable 9V Battery http://bit.ly/2DxPRma 3. Uno Rev 3 http://amzn.to/2DxVCQP 4. SD Module http://bit.ly/2DyDFl9 5. Grove Dust Sensor http://bit.ly/2Caxx6z 6. Grove Temp & Humidity Sensor http://bit.ly/2ybWbxG 7. Grove Light Sensor http://bit.ly/2Cj3Xem 8. ESP8266 Transceiver http://bit.ly/2zN3kEL 9. Grove Air Quality Sensor http://bit.ly/2khVUah All the components operate at 5v with the exception of the ESP8266 which is 3.3v. I have been looking at different methods of powering the system and noticed people using LiPo batteries. I'm aware that you shouldn't let there voltage drop too low and something about voltage regulators and boost converters that might be needed.  Based on my system can anyone recommend the best method of powering everything using batteries and charging it through solar energy.   I'm fairly new to the Arduino Eco system and this kind of work in general, so any help would be greatly appreciated. Thanks in advanced. 

Asked by hymcode 1 year ago  |  last reply 1 year ago


Review of my first PCB design for a current meter shield?

I am completely new in designing circuits and PCBs and would appreciate your feedback on my first project. I want to measure the current flowing through an AC line using the ACS712 current sensor (IC1). The analog output (which is a proportional voltage between 0V and 5V) is converted using an ADS1115 (IC2). The digital signal is passed to an underlying Wemos D1 mini board via I2C, which contains an ESP8266 to process and send the data to a server. Furthermore, an AC/DC module (HLK-PM01) is mounted on the bottom side of the PCB to power the components.

Asked by DELETED_MakiY2 1 year ago


Mechanical parts for automated curtain control

Hi guys,I am building an automated curtain control, based on an ESP8266, to be controlled by the sun comming up (or going down) or by time or by smartphone. The electronics and software are all but complete, but I do have a problem...First, how can I open and close the curtains? I was thinking about a fishing wire in a loop, but how do I get enough traction from a pulley to move the curtains?Second, how can I make sure that the curtains can be opened and closed manualy, without frying the motor? Third, how do I detect the position of the curtain?Alex

Asked by alex452 3 months ago  |  last reply 3 months ago


Need coding to handle multiple relays with multiple touch sensor (TTP223), IR remote and from web for nodemcu ESP12E?

Hey friends! Can anyone help me in designing a switch board which can be operated with touch sensors (TTP223), IR Remote and also with web application (like android / ios app) or with http:// . Coding for the same is my basic requirement. Basically i am looking for the coding. The things which i am having with me : 1) 5v - 8 ch Relay, 2) TTP 223 Touch sensor (6 nos) 3) V1.0 NodeMcu LUA WiFi Networking ESP8266 Development Board and  4) DS3231 AT24C32 IIC Precision RTC Real Time Clock Memory Module any comments are welcome!!!

Asked by KrishnaV35 2 years ago  |  last reply 2 years ago


arduino wifi time-lapse camera

Hello everyone, I am trying to build a cheap arduino controlled time-lapse camera system. parts I chose so far are; camera; OV7670 wifi; ESP8266 board; nano here is an amazing instructable on how to use the wifi module; WiFi temp logger. Unfortunately I can't find a simple and well written instructions on how to connect the camera module mentioned above. I don't need to save the file on the board, I just need it uploaded to a web page, cloud etc. the picture will be taken 2 times a day with 10hr delay in between (one morning, one afternoon). here is the closest example I can find on instructables to what I want to accomplish, although this is over bluetooth and a different camera module. 1. arduino time-lapse camera 2. image capturing bird feeder thank you for your help. this is very important for me, I am very new in the field and don't have much experience. I am sure many other people will find such an instructable useful as these modules are extremely cheap. . love & peace akin,

Posted by Akin Yildiz 4 years ago  |  last reply 2 years ago


How to call an api with nodemcu from this wesite:http: (//davidayala.eu/current-time/)?

Http://davidayala.eu/current-time/ The website above offers free Timezone APIs. I have been trying to request the API with my esp8266 NodeMCU, but still, i get no response. Can anyone please demonstrate to me with a code sample how it's supposed to be done? I will be posting my code soon. The following is my code (In arduino IDE) for my NodeMCU #include String result; char host[]="script.google.com"; WiFiClient client; void setup() { // put your setup code here, to run once: Serial.begin(9600); WiFi.begin("Faiz", "hautepackard"); while(WiFi.status() != WL_CONNECTED){ Serial.print("."); delay(500); } Serial.println("Connected!"); Serial.println(WiFi.localIP()); } void loop() { Time(); delay(3000); } String url = "/macros/s/AKfycbyd5AcbAnWi2Yn0xhFRbyzS4qMq1VucMVgVvhul5XqS9HkAyJY/exec"; void Time(){ if (client.connect(host, 443)) { //starts client connection, checks for connection client.print(String("GET ") + url + " HTTP/1.1\r\n" + "Host: " + host + "\r\n" + "Connection: close\r\n\r\n"); Serial.println("Server is accessible"); } else { Serial.println("connection failed"); //error message if no client connect Serial.println(); } result = ""; while (client.available()) { //connected or data available char c = client.read(); //gets byte from ethernet buffer result = result+c; } Serial.println(result); client.stop(); //stop client Serial.println("end of function"); } And this is what i get in the Serial monitor: ........Connected! Server is accessible end of function Am i going wrong anywhere in the code? Please help this burning question.

Asked by Techovator0819 1 year ago  |  last reply 1 year ago


HOW TO SHOW DYNAMIC GPS DATA AND AUTO REFRESH PAGE ON WEB BROWSER ?

Hello, I'm using ESP8266 WIFI module and GPS module. I have connected to ARDUINO UNO R3 board to read the GPS coordinates and transmit them to webpage using ESP8266 WiFi module connected to router. In my code the page change only when I press F5 (refresh) , and so I can see the change of Coordinates. I want to see the changing results dynamically with out refreshing the webpage. what to I need to do /change in order that it will change automatically? please check my code here or in the attachment  and suggest me the changes. Thanks in advance. CODE: // code starts #include #include SoftwareSerial Serial1(2,3);     //   ESP8266 RX pin 2, TX pin 3. SoftwareSerial gps(11, 10);       //   GPS RX pin 10, TX pin 11.   boolean No_IP=false; String IP=""; String webpage=""; int i=0,k=0; int  gps_status=0; String name=" Name: XXXXXXXX ";   //22 String date="DATE: DD MM YYYY";     //21 String number=" Vehicle No.: ABC 0000";//29 String cordinat="Coordinates:";          //17 String latitude=""; String logitude="";                       String gpsString=""; char *test="$GPGGA"; void check4IP(int t1) {   int t2=millis();   while(t2+t1>millis())   {     while(Serial1.available()>0)     {       if(Serial1.find("WIFI GOT IP"))       {         No_IP=true;       }     }   } } void get_ip() {   IP="";   char ch=0;   while(1)   {     Serial1.println("AT+CIFSR");     while(Serial1.available()>0)     {       if(Serial1.find("STAIP,"))       {         delay(1000);         Serial.print("IP Address:");         while(Serial1.available()>0)         {           ch=Serial1.read();           if(ch=='+')           break;           IP+=ch;         }       }       if(ch=='+')       break;     }     if(ch=='+')     break;     delay(1000);   }   Serial.print(IP);   Serial.print("Port:");   Serial.println(80);   delay(1000); } void connect_wifi(String cmd, int t) {   int temp=0,i=0;   while(1)   {     Serial.println(cmd);     Serial1.println(cmd);     while(Serial1.available()>0)     {       if(Serial1.find("OK"))       {       i=8;       }     }     delay(t);     if(i>5)     break;     i++;   }   if(i==8)   {     Serial.println("OK");   }   else   {   Serial.println("Error");   }   delay(1000); } void setup() {   Serial1.begin(9600);   Serial.begin(9600);   delay(1000);   connect_wifi("AT",1000);   connect_wifi("AT+CWMODE=3",1000);   connect_wifi("AT+CWQAP",1000);    connect_wifi("AT+RST",5000);   check4IP(5000);   if(!No_IP)       {         Serial.println("Connecting Wifi....");         connect_wifi("AT+CWJAP=\"MountPointTech\",\"MpTl2013\"",7000);   //AT+CWJAP="wifi_username","wifi_password"       }       else         {         }       Serial.println("Wifi Connected");       get_ip();       delay(2000);       connect_wifi("AT+CIPMUX=1",100);       connect_wifi("AT+CIPSERVER=1,80",100);       Serial1.end();       Serial.println("Waiting For GPS");       Serial.println("     Signal    ");       delay(2000);       gps.begin(9600);       get_gps();       show_coordinate();       gps.end();       Serial1.begin(9600);       delay(2000);      Serial.println("GPS is Ready");       delay(1000);       Serial.println("System Ready.."); } void loop() {   k=0;   Serial.println("Please Refresh Ur Page");   while(k<1000)   {     k++;    while(Serial1.available())    {     if(Serial1.find("0,CONNECT"))     {       Serial1.end();         gps.begin(9600);       get_gps();       gps.end();       Serial1.begin(9600);       Serial1.flush();       Serial.println("Start Printing");       Send();       show_coordinate();       Serial.println("Done Printing");       delay(5000);       //delay(1000);       k=1200;       break;     }   }   delay(1); } } void gpsEvent() {   gpsString="";   while(1)   {    while (gps.available()>0)                //Serial incoming data from GPS    {     char inChar = (char)gps.read();      gpsString+= inChar;                    //store incoming data from GPS to temporary string str[]      i++;      if (i < 7)                           {       if(gpsString[i-1] != test[i-1])       //check for right string       {         i=0;         gpsString="";       }      }     if(inChar=='\r')     {      if(i>65)      {        gps_status=1;        break;      }      else      {        i=0;      }     }   }    if(gps_status)     break;   } } void get_gps() {    gps_status=0;    int x=0;    while(gps_status==0)    {     gpsEvent();     int str_lenth=i;     latitude="";     logitude="";     coordinate2dec();         i=0;x=0;     str_lenth=0;    } } void show_coordinate() {         Serial.print("Latitude:");     Serial.println(latitude);     Serial.print("Longitude:");     Serial.println(logitude); } void coordinate2dec() {         //j=0;     String lat_degree="";     for(i=18;i<20;i++)          //extract latitude from string       lat_degree+=gpsString;         String lat_minut="";     for(i=20;i<28;i++)       lat_minut+=gpsString;         String long_degree="";     for(i=30;i<33;i++)          //extract longitude from string       long_degree+=gpsString;           String long_minut="";     for(i=33;i<41;i++)       long_minut+=gpsString;            float minut= lat_minut.toFloat();      minut=minut/60;      float degree=lat_degree.toFloat();      latitude=degree+minut;           minut= long_minut.toFloat();      minut=minut/60;      degree=long_degree.toFloat();      logitude=degree+minut; } void Send() {            webpage = "Welcome to MountPoint Technologies Pvt Ltd";       webpage+=name;       webpage+=date;       webpage+=number;       webpage+=cordinat;       webpage+="Latitude:";       webpage+=latitude;       webpage+="";       webpage+="Longitude:";       webpage+=logitude;       webpage+="";       webpage+= "       webpage+=latitude;       webpage+='+';              //28.612953, 77.231545   //28.612953,77.2293563       webpage+=logitude;       webpage+="\">Click Here for google map ";       sendwebdata();       webpage="";        while(1)          {       Serial.println("AT+CIPCLOSE=0");       Serial1.println("AT+CIPCLOSE=0");       while(Serial1.available())       {         //Serial.print(Serial1.read());         if(Serial1.find("0,CLOSE"))         {           return;         }       }       delay(500);       i++;       if(i>5)       {         i=0;       }       if(i==0)       break;      } } void sendwebdata() {      i=0;      while(1)      {       unsigned int l=webpage.length();       Serial1.print("AT+CIPSEND=0,");       Serial1.println(l+2);       Serial.println(l+2);       Serial.println(webpage);       Serial1.println(webpage);       while(Serial1.available())       {         if(Serial1.find("OK"))         {          return;         }       }             i++;       if(i>5)         i=0;         if(i==0)         break;       delay(200);      } } // end of code.

Posted by shivendrareddy 2 years ago


Home automation & Home door sequrity including one android apk file project available ???

Please help me for this project. how will be arduino program code , which pin are connect to apparatus to apparatus. please give me all description step by step this project implimentation. Project planning:-                   1.Home automation & Home door sequrity including one android apk file.                   2. 4 Relay:   1. Blue led light.                                 2. Red  led light.                                 3. White led light for bath room using PIR sensor.(this light switch on/off only using pir sensor,                                            because-wet hand electric shock on switch or, damged mobile display).                                 4. Fan using voltage regulator.                                  note:- light switch on/off & fan switch & voltage regulataor incease/decrease including appk file.                   3.Home squrity switch board on/off may be   a.display board on wall of house.                                                                b. display in android apk file.                   4.when open door with corect srquirty,then photo upload in memory card.if incorect password then a lout of sound.                   5.when fire in house ,alarm using gas sensor. Room temperature, huminity show in display. Apparatues:            A: Led light on/off by mobile app.                  1.ESP8266 Serial Wi-Fi Wireless Transceiver Module for IOT.                  2.Generic(unbranded )4-channel relay control board module with optocoupler, 4 way relay module for arduino                  3.Arduino Uno R3 ATmega328P ATMEGA16U2 Compatible with USB Cable.                     or,xcluma Atmel Atmega 2560 Mega2560-16Au (16 Mhz) R3 Board+Usb Cable For Arduino.                  4.Led light 3(Blue,Red,White for Bath room),Motor Fan.                  5.REES52 REES_2 Bread Board or Solderless Pieces Circuit Test Board Project Board.                  6.Jumper Wires Male to Male, male to female, female to female.                  7.Generic KG001 HC-SR501 PIR Sensor Pyroelectric Infrared Module 2pcs(for bath room & door open).                  8.Adraxx LM7805 7508 Positive Voltage Regulator IC, 5V 1A.                  9.Resister 1k ohm.                  10.REES52 MQ2 Arduino Compatible Gas Sensor, Methane, Butane, LPG, Smoke Sensor.           B: Home sequrity.                  1.Quantum QHM495LM 25MP Web Camera.                  2.SanDisk Ultra MicroSDHC 32GB UHS-I Class 10 Memory Card With Adapter.                  3.REES52 621033926893 Universial 16 Key Switch Keypad Keyboard Fit for Arduino by REES52.                  4.Silicon Technolabs 20x4 Line LCD Display With Blue backlight HD44780 for ALL Arduino,Rasp Pi,AVR,ARM,8051 (Blue). Software:      1. Arduino-1.8.5.                2. wampserver & notepad++ (for php web page).                3. Android Apk file.      please help me for this project. how will be arduino program code , which pin are connect to apparatus to apparatus. please give me all description step by step this project implimentation.  i will waiting for you.

Asked by somnathpanjaproject2018 1 year ago  |  last reply 1 year ago


Automatic Irrigation using d1 mini

Hi Everyone, I reviewed different automatic irrigation system projects here in instructables and other sites as well and i decided to gather parts to do a simple small project myself. One thing that comes hard is the programming part as I don't know any programming language. I'm looking for some help with code merging, explanation and some general guidance. Could you please let me know, point me to right direction and tell me what you think and if requirements are actually achievable? What I would like to achieve: Intention of this project is to have manual and auto irrigation system which will: 1. Measure soil moisture and dependently on the value activate the usb pump which will water the plant (preferably analog output that will show the measurements in %) 2. Manual activating the pump via hardware button and via mobile phone with internet connection 3. Distance sensor which should measure how much water is left in the tank 4. Email notification with info when to water the plants and soil sensor data regardless of the automatic process that has already started 5. Email notification with info about the water in the tank when it’s near empty 6. Dashboard preferably inside the network (not using third party like blynk or others) with access from the internet (I have QNAP that I think can be used). 7. If possible – have amazon echo (Alexa) read the sensor data to tell me the values and comment if the plant should or shouldn’t be watered or the tank should be refiled or not as well as ability to ask Alexa to start or stop the irrigation Hardware: D1 mini: https://wiki.wemos.cc/products:d1:d1_mini Wemos V2 Relay shield: http://hobbycomponents.com/shields/865-wemos-v2-relay-shield My relay is slightly modified: 2 small wires soldered to the vcc and ground so that when it receives the signal on d1 pin it opens and current flows to female usb connector supposedly activating the usb water pump. All this can be stacked together even with soldered wires YL-69 sensor: http://www.oddwires.com/yl-69-soil-hygrometer-humidity-soil-moisture-detection-sensor/ Ultrasonic Distance Sensor (HC-SR04): https://thepihut.com/products/ultrasonic-distance-sensor-hcsr04 USB mini water pump: www.goo.gl/yUABDd Button x4 if needed: Board x4 if needed: sample codes used in other projects: https://randomnerdtutorials.com/guide-for-soil-moisture-sensor-yl-69-or-hl-69-with-the-arduino/ https://create.arduino.cc/projecthub/nekhbet/using-the-yl-39-yl-69-soil-humidity-sensor-with-arduino-968268 https://community.blynk.cc/t/irrigation-relay-with-timer-esp8266-wip/700 Alexa enabled homemade cat feeder example: https://www.hackster.io/darian-johnson/alexa-powered-automated-cat-feeder-9416d4 Thank you very much in advance for your help and support.

Posted by wube 1 year ago  |  last reply 1 year ago