ESP8266 WiFi relay control

Поделиться
HTML-код
  • Опубликовано: 5 июн 2017
  • ESP8266 WiFi Relay Control
    In this video we set up an ESP8266 as a web server to control a relay. With this setup you can control almost anything: lights, motors, fans, heaters, etc from anywhere in the world.
    WeMos® D1 R2 WiFi ESP8266 Development Board -- goo.gl/5U7LMy
    You can get the code here: pastebin.com/mjW9CZpr
    ~-~~-~~~-~~-~
    Please watch: "Diodes: The basic building block of all digital circuits"
    • Diodes: The basic buil...
    ~-~~-~~~-~~-~
  • РазвлеченияРазвлечения

Комментарии • 182

  • @ku4nz
    @ku4nz 4 года назад +1

    So cool, just got my 8266 boards in from Banggood. Thanks for very clear instructions.

  • @xyboox
    @xyboox 6 лет назад +4

    Love the "HTML mambo jumbo"! Made my evening! :))

  • @rickbrown945
    @rickbrown945 6 лет назад +2

    great job with this information! i've sat through a lot of tutorials lately and this one is one of the few keepers!
    i'm looking forward to trying this out soon! THANKS

  • @MauroAnderlini
    @MauroAnderlini 6 лет назад +7

    thanks for this very clear tutorial that made me clear into several things!

  • @HomeCode
    @HomeCode Год назад

    Ja, super helpful! Thanks so much. I felt pretty confused when first getting this guy but am now stoked.

  • @borayurt66
    @borayurt66 4 года назад +2

    I like the way you explain things to dummies like me! Subscribed!

  • @NicleT
    @NicleT 3 года назад

    Thank you so much! This is the missing link I was looking for. I’m planning to create a door lock with (motorized) metal bars, but wanted a simple way to control it via Internet.

  • @dewaldolivier3216
    @dewaldolivier3216 3 года назад +1

    Amazing tutorial, thank you for the detailed video!

  • @rawestmoreland
    @rawestmoreland 6 лет назад

    Thanks so much for the great tutorial! I was wondering how to go about doing this exact same thing, but uploading that http code to a subdomain on my personal website in order to control the relay from anywhere.

  • @ae1tpa92gwtom2
    @ae1tpa92gwtom2 5 лет назад

    Nice video, I did similar with NodeMCU controlling external lights from my phone remotely, works a treat, Very nice project, next wil be camera, n PIR detection, . Cheers

  • @AlphaBravo860
    @AlphaBravo860 4 года назад

    Checking out your channel for the first time.. Really cool! Thanks for sharing all your hard but cool work!

  • @goodwill7643
    @goodwill7643 5 лет назад +3

    some internet browsers are checking URL links for updates, what can cause random switching. So you need to keep it in mind by using GET method in URL. And you need to check for WiFi connection if got lost and you need to reconnect. I had similar issues some time ago for standby application.

  • @InferiorPotassium93
    @InferiorPotassium93 4 года назад

    Great video thanks so much for showing an example I had one of these with no idea how to control it

  • @ricardo.richardii
    @ricardo.richardii 5 лет назад +2

    it worked perfectly here.. thanks from Brazil

  • @user-mc4xv9jg8d
    @user-mc4xv9jg8d 4 года назад

    You are a good teacher. nice video. thank you so much.

  • @WaterFish22
    @WaterFish22 4 года назад

    Thanks for the code i will have to try it out!

  • @Ali-yj9di
    @Ali-yj9di 3 года назад +1

    Thank you so much, its working fantastic

  • @ctndev_
    @ctndev_ 6 лет назад +1

    Thanks for your tutorial, you helped me so lot! I'm brazilian and you helped me to choose this device for learn more about arduino with wifi works. Great tutorial! Thank you for yout time.
    Sorry for poor english.

    • @learnelectronics
      @learnelectronics  6 лет назад +1

      +Yuri Alexsander Your English is just fine. Thank you for your kind words.

  • @mmaurier2007
    @mmaurier2007 4 года назад

    Thanks, everything worked!

  • @georgechambers3197
    @georgechambers3197 7 лет назад +1

    Thanks for the code! With a little html programming that could make a neat setup. You could turn on/off a device from anywhere on your network or beyond. Thanks for the video can't wait for tomorrows adventure. Oh I didn't have time last night but will give it a go.

    • @kobeasher4563
      @kobeasher4563 2 года назад

      I guess Im asking randomly but does anybody know of a trick to get back into an instagram account?
      I was dumb lost my login password. I would love any assistance you can offer me

    • @leolouie9549
      @leolouie9549 2 года назад

      @Kobe Asher instablaster ;)

    • @kobeasher4563
      @kobeasher4563 2 года назад

      @Leo Louie Thanks so much for your reply. I got to the site through google and Im waiting for the hacking stuff atm.
      Takes a while so I will get back to you later when my account password hopefully is recovered.

    • @kobeasher4563
      @kobeasher4563 2 года назад

      @Leo Louie It worked and I actually got access to my account again. Im so happy:D
      Thank you so much, you really help me out !

    • @leolouie9549
      @leolouie9549 2 года назад

      @Kobe Asher No problem =)

  • @MrBobWareham
    @MrBobWareham 3 года назад

    Loved the video you explained it in a very easy way to follow but was hoping you were going to show an easier way than that as I just want two Wemos d1 mini boards with a switch on the first one on-off, and the 2nd one with a light so when the switch on the first one is turned on the light on the second one comes on. any suggestions would be good thanks!!

  • @sajjadabadi8995
    @sajjadabadi8995 4 года назад

    this was a good tutorial
    thank you

  • @cw4608
    @cw4608 3 года назад

    If you don’t know already, I’m not going to tell you - good idea!

  • @mohammadmoinulhaq2501
    @mohammadmoinulhaq2501 6 лет назад

    Appreciate! Keep Creating Such Awesome Videos Boss!

  • @rayenpradipta3091
    @rayenpradipta3091 5 лет назад

    thanks.. good job brother..

  • @anokhautomation4453
    @anokhautomation4453 Год назад

    Nice project and tutorial 👍

  • @assilsoft
    @assilsoft Год назад

    good job, thank you.

  • @mostafavafaei2629
    @mostafavafaei2629 7 лет назад

    Dear thank you for your videos. I have a question of how can we connect from outside of the network , maybe by mobile network or etc.

  • @SaravanaKumar53
    @SaravanaKumar53 5 лет назад

    Is it the same relay that we use for both dc and ac peripherals that we are operating, in this case the bulp

  • @eddie_Za
    @eddie_Za 11 месяцев назад

    Wow, a 6years old guide n i just started learning now...😅

  • @2KD2Gaming
    @2KD2Gaming 5 лет назад

    Thanks, Good one man!

  • @frutt5k
    @frutt5k 2 года назад

    Switching coils without buffer transistor and protection diode can be dangerous. I can recommend a ULN 2003 driver. It has 7 protected buffers in one 16 pin package.

  • @rocku19
    @rocku19 3 года назад

    Hi, Thanks for the video. a question : output of esp8266 signal is 3v? & how did you manage to control 5v relay input signal?

  • @meesiphht2769
    @meesiphht2769 4 года назад

    Have you ever done something like turning off a relay if/when the main power goes off so that your solar power doesn't feed back into the grid?

  • @andriyandriy6033
    @andriyandriy6033 4 года назад

    I really do not understand those people who put dislike for this video...

  • @quoit99training83
    @quoit99training83 6 лет назад +2

    Exactly what I was looking for! Hey is there a tutorial on using “deep sleep” for esp8266 to conserve battery?

    • @learnelectronics
      @learnelectronics  6 лет назад +1

      +quoit99 training Here's my entire esp32 playlist:
      ruclips.net/p/PLGhvWnPsCr58OIrVHh21zc1w_ZRU4VqNf
      Check out esp32 features demo

  • @mandeepmails
    @mandeepmails 3 года назад

    Nice and informative video.
    Question - i connected wemos with relay and AC power accessories. i'm able to control but because of no power-backup or whatever reason if there's couple power fluctuations, it wipes out the config from the esp8266.
    Any ideas, how to avoid it ?

  • @jbflores01
    @jbflores01 4 года назад

    great video. I plan to use the ios Blynk app to run some domestic projects. I saw the relay on eBay but they don't come with the black pc breakout board you have on your video. where can I find the relay attachment base? thanks once again for the great tutorials!

  • @iamZairul
    @iamZairul 4 года назад

    good video.ty for sharing

  • @Elfnetdesigns
    @Elfnetdesigns Год назад

    Another neat thing you can do with these is upload a different firmware that turns these into WiFi repeaters

  • @csselo
    @csselo 6 лет назад

    thanks

  • @aleneze85
    @aleneze85 7 лет назад +1

    Thank you.

  • @jamiebridges8529
    @jamiebridges8529 6 лет назад

    Hey, awesome and interesting tutorial, thanks. I was just given a D1 and was wondering whether you think it would be possible to create a SONOS Speaker control board using it? E.g. pause/play/volume for the SONOS. I'm relatively new to anything arduino related, and kinda alright at programming! hahah

    • @learnelectronics
      @learnelectronics  6 лет назад

      +Jamie Bridges I have never messed around with SONOS but but I would imagine you could

  • @nickmountakis
    @nickmountakis 7 лет назад

    Hello from Greece! Nice, simple video as always!Can you make more videos about the ESP-8266? For example, how to toggle a pin from internet using cellular data from phone or using other, non local WiFi..? Or how to connect two ESP-8266 together?
    Looking forward to your reply!

    • @learnelectronics
      @learnelectronics  7 лет назад +2

      Nikos Mountakis hi! I'm happy you liked the video. there will be at least 1 esp8266 video a week.

  • @draghiciciprian4002
    @draghiciciprian4002 6 лет назад

    Thanks a lot for the description. It is great. How can I make the app for multiple channels? Thank you.

  • @DrexProjects
    @DrexProjects 5 лет назад

    Back EMF? Are you sure you are using the term correctly for that diode. I think it's there to drain the relay coil quickly so the contacts don't linger in the on position when the power is cut. Back EMF refers to motors.

  • @webslinger2011
    @webslinger2011 4 года назад

    Hi! Anything with an esp8266 for sending and receiving data and control that goes through an external cloud server?

    • @MutheloKhakhathi
      @MutheloKhakhathi 4 года назад

      Ever tried Blynk?

    • @webslinger2011
      @webslinger2011 4 года назад

      @@MutheloKhakhathi Didn't try. Besides, it's not free like adafruit.io

  • @Elfnetdesigns
    @Elfnetdesigns Год назад

    it is also ideal to set these up with static IP addresses as well so the devices retain their addresses and you know who is who. Anyways here is a modified sketch that supports multiple relays and has a nicer webpage
    #include
    const char* ssid = "yourssid";
    const char* password = "yourwifipass";
    WiFiServer server(80);
    String header;
    String output4State = "Off";
    String output5State = "Off";
    String output12State = "Off";
    String output13State = "Off";
    String output14State = "Off";
    const int output4 = 4;
    const int output5 = 5;
    const int output12 = 12;
    const int output13 = 13;
    const int output14 = 14;
    unsigned long currentTime = millis();
    unsigned long previousTime = 0;
    const long timeoutTime = 2000;
    IPAddress local_IP(0.0.0.0);
    IPAddress gateway(0.0.0.0);
    IPAddress subnet(0.0.0.0);
    IPAddress primaryDNS(0.0.0.0);
    IPAddress secondaryDNS(0.0.0.0);
    void setup() {
    Serial.begin(115200);
    pinMode(output4, OUTPUT);
    pinMode(output5, OUTPUT);
    pinMode(output12, OUTPUT);
    pinMode(output13, OUTPUT);
    pinMode(output14, OUTPUT);
    digitalWrite(output4, LOW);
    digitalWrite(output5, LOW);
    digitalWrite(output12, LOW);
    digitalWrite(output13, LOW);
    digitalWrite(output14, LOW);

    if (!WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)) {
    Serial.println("STA Failed to configure");
    }
    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());
    server.begin();
    }
    void loop(){
    WiFiClient client = server.available();
    if (client) {
    Serial.println("New Client.");
    String currentLine = "";
    currentTime = millis();
    previousTime = currentTime;
    while (client.connected() && currentTime - previousTime = 0) {
    Serial.println("GPIO 4 On");
    output4State = "On";
    digitalWrite(output4, HIGH);
    } else if (header.indexOf("GET /4/Off") >= 0) {
    Serial.println("GPIO 4 Off");
    output4State = "Off";
    digitalWrite(output4, LOW);
    }
    else if (header.indexOf("GET /5/On") >= 0) {
    Serial.println("GPIO 5 On");
    output5State = "On";
    digitalWrite(output5, HIGH);
    } else if (header.indexOf("GET /5/Off") >= 0) {
    Serial.println("GPIO 5 Off");
    output5State = "Off";
    digitalWrite(output5, LOW);
    }
    else if (header.indexOf("GET /12/On") >= 0) {
    Serial.println("GPIO 12 On");
    output12State = "On";
    digitalWrite(output12, HIGH);
    } else if (header.indexOf("GET /12/Off") >= 0) {
    Serial.println("GPIO 12 Off");
    output12State = "Off";
    digitalWrite(output12, LOW);
    }
    else if (header.indexOf("GET /13/On") >= 0) {
    Serial.println("GPIO 13 On");
    output13State = "On";
    digitalWrite(output13, HIGH);
    } else if (header.indexOf("GET /13/Off") >= 0) {
    Serial.println("GPIO 13 Off");
    output13State = "Off";
    digitalWrite(output13, LOW);
    }
    else if (header.indexOf("GET /14/On") >= 0) {
    Serial.println("GPIO 14 On");
    output14State = "On";
    digitalWrite(output14, HIGH);
    } else if (header.indexOf("GET /14/Off") >= 0) {
    Serial.println("GPIO 14 Off");
    output14State = "Off";
    digitalWrite(output14, LOW);
    }

    client.println("");
    client.println("");
    client.println("");
    client.println("html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}");
    client.println(".button { background-color: #195B6A; border: none; color: white; padding: 16px 40px;");
    client.println("text-decoration: none; font-size: 30px; margin: 2px; cursor: pointer;}");
    client.println(".button2 {background-color: #77878A;}");
    client.println("Control Interface");
    client.println("Relay 01 is: " + output4State + "");
    if (output4State=="Off") {
    client.println("Turn On");
    } else {
    client.println("Turn Off");
    }

    client.println("Relay 02 is: " + output5State + "");
    if (output5State=="Off") {
    client.println("Turn On");
    } else {
    client.println("Turn Off");
    }

    client.println("Relay 03 is: " + output12State + "");
    if (output12State=="Off") {
    client.println("Turn On");
    } else {
    client.println("Turn Off");
    }

    client.println("Relay 04 is: " + output13State + "");
    if (output13State=="Off") {
    client.println("Turn On");
    } else {
    client.println("Turn Off");
    }

    client.println("Relay 05 is: " + output14State + "");
    if (output14State=="Off") {
    client.println("Turn On");
    } else {
    client.println("Turn Off");
    }

    client.println("");
    client.println();
    break;
    } else {
    currentLine = "";
    }
    } else if (c != '
    ') {
    currentLine += c;
    }
    }
    }
    header = "";
    client.stop();
    Serial.println("Client disconnected.");
    Serial.println("");
    }
    }

  • @coolfiretech
    @coolfiretech 4 года назад +2

    Thank you sir,It is very useful to me...but a doubt, what is DIP switch sir...please reply me sir....

  • @arthurmead5341
    @arthurmead5341 4 года назад

    The webserver loads fine for me, and i can click on on and off, but it doesn't switch the relay. I can manually switch it by plugging and unplugging the analog or ground pins though, do you know what is up?

  • @vivekvenkatsubramaniam437
    @vivekvenkatsubramaniam437 7 лет назад

    Thanks for the video, man! I was trying to wrap my head around an ESP-01, to toggle a bunch of LEDs through a webpage. This setup would be perfect. Perhaps in another video you could turn on and turn off an appliance with this just to give us an idea of how it's done?
    PS: Is port 80 the only port we must use for html or can we use any other port number?

    • @learnelectronics
      @learnelectronics  7 лет назад +1

      Vivek Venkat Subramaniam this video IS how you turn on and off an appliance. that's what the relay is for. appliance goes through the relay.

    • @sickthotsonmymind2299
      @sickthotsonmymind2299 4 года назад

      Yes, port 80 is designated for HTTP (HyperText Transfer Protocol) which is the protocol that runs the internet. You can send HTTP traffic over other ports but you'd have to configure the device/code to run its server on a different port and you would have to make the requests from that port as well.

  • @MyChannel-he1tm
    @MyChannel-he1tm 5 лет назад +1

    tnx bro..i make it

  • @thecongo8505
    @thecongo8505 4 года назад

    Very nice

  • @jamest.5001
    @jamest.5001 4 года назад

    I just realized, the diy bms uses the wemos d1 mini/ mini pro! I don't really care for WiFi, do you know if the data that goes out on WiFi, can it be sent through HDMI also? And what it would require if possible? Good day sir!

  • @latorreseba
    @latorreseba 7 лет назад

    thanks u a lot

  • @maxsu8795
    @maxsu8795 6 лет назад

    question on which board you have selected in the IDE?? generic 8266? thanks

  • @stefanvanraemdonck9054
    @stefanvanraemdonck9054 4 года назад

    Thanks. It works very well, but how can we prevent the change to very small font.
    I tried with client.println(""); bus it doesn't work

  • @Khish4710
    @Khish4710 4 года назад +2

    i encountered 'D5' was not declared in this scope??
    i'am only a beginner
    thanks for your response

    • @nickolaisimmons4638
      @nickolaisimmons4638 2 года назад

      Try just changing to "5". Not all boards have "D5", some just have a number so I found changing it to "5" got rid of that error.

  • @jjl6519
    @jjl6519 5 лет назад +1

    Thanks for another great video but I am having a problem loading the ESP8266WiFi.h library. I noticed in the comment section that someone asked that question before and the reply but try as I might I cant find that library or file.. what am I doing wrong, thanks

  • @DhizqiVLOG
    @DhizqiVLOG 6 лет назад

    Why Everytime i Connect The Wemos To Electric The Led Lamp Must Be On

  • @JasonRobards2
    @JasonRobards2 4 года назад +2

    When I used this code to have a wemos repeatingly respond to a client (like my C# program running on pc), the client starts throwing SocketExceptions and such. Took me a while to figure out what this all meant. Only after some searching, I found that the server (the arduino) disconnects after the first response.
    It seems that the code used here makes a new client every loop and the client needs to reconnect every time.
    Just a heads up in case somebody runs into similar programs.

    • @anukreddi
      @anukreddi 3 года назад

      Did you find a solution, what is?

    • @JasonRobards2
      @JasonRobards2 3 года назад

      @@anukreddi WiFiClient client = server.available(); --> this creates a new client object, disconnecting the old one, if there is one.
      I instead put it like this:
      Before setup:
      WiFiClient client;
      In loop:
      if (!client) {
      client = server.available();
      return;
      }

  • @joshuatala7135
    @joshuatala7135 4 года назад

    Hi Brother may I ask what library did you use?

  • @RiyadhMarthinus
    @RiyadhMarthinus 6 лет назад +1

    I hope you still respond to these comments. I've been trying to get my ESP8266 to trigger my relay module. However because the relay module runs on 5v, the relay does not activate with the 3.3v signal from the ESP8266. Works just fine with an arduino but I can't get it to trigger with an esp. Can you give me any workaround for this problem?

    • @learnelectronics
      @learnelectronics  6 лет назад +1

      +Riyadh Marthinus different relay? Or different micro...

    • @RiyadhMarthinus
      @RiyadhMarthinus 6 лет назад +1

      learnelectronics so, believe it or not. Just yesterday I got this sensor kit in the mail and it had a relay module that worked just fine with the esp. I think the issue is that the relay modules that I have only detects 5v as an active high signal whereas the one I got yesterday takes 3.3v as an active high too. Its a pitty because I ordered so many of those modules but maybe I could trigger them with a transistor or something. Thanks for checking up though man!

  • @zulfitrizulkarnainasnahzul7276
    @zulfitrizulkarnainasnahzul7276 6 месяцев назад

    hi .. how to set up everything we need at HTTP section in our phone to access and control the board?

  • @STFUC
    @STFUC 3 года назад

    Cool project!!
    Can you access this server from outside of your local network?

  • @michaelpadovani9566
    @michaelpadovani9566 7 лет назад

    Effective and cool

  • @eduardfabianespitia9962
    @eduardfabianespitia9962 5 лет назад

    Hello!
    I have a question...
    Do i can to connect the WEMOS D1 directly to the computer?

    • @learnelectronics
      @learnelectronics  5 лет назад +1

      In the beginning you do to program it. After that. No.

  • @birdiebertus
    @birdiebertus 6 лет назад +4

    thanks for code all work! can you explean how to ad more channels for more relays? thanks

    • @learnelectronics
      @learnelectronics  6 лет назад +1

      +B.g Veenstra thanks. Check out this video I did with 3 channels
      ruclips.net/video/-9D-vtZ-wl4/видео.html

    • @birdiebertus
      @birdiebertus 6 лет назад +1

      thanks but it is not possible to load the code in my ESP8266 wifi shield
      do you want to make a code for me? i am a total noob with this
      email birdiebertus@hotmail.com

    • @learnelectronics
      @learnelectronics  6 лет назад +2

      +B.g Veenstra I could write the code for you. My rate is $50.00/hr US. Estimate 4 hours.

    • @birdiebertus
      @birdiebertus 6 лет назад

      Oké for me is it posible to pay with paypal

    • @learnelectronics
      @learnelectronics  6 лет назад

      +B.g Veenstra Yes it is, email me arduino0169@gmail.com and we can work out the details.

  • @NestorLanadaSilva
    @NestorLanadaSilva 6 лет назад

    Good!

  • @S24W2
    @S24W2 9 месяцев назад

    I have to say I did not get a lot of the code stuff, more of an explanation would have been helpful, I'm not really sure what's is going on gere, what is the server etc ? But tha k you anyway was still good video and helpful

  • @prateekkashyap6751
    @prateekkashyap6751 2 года назад

    hey....buddy....this video is awsm....bt I have a question , by this relay can we operate SINGAL PHASE MOTER ...motor use for pumping water that we use in our homes.....

  • @ManuelCastillo-kq3xy
    @ManuelCastillo-kq3xy 5 лет назад

    Hi, i need control 8 relay. It’s possible? How i doit this? Help me, please!!!

  • @MRizalWrc
    @MRizalWrc 5 лет назад +1

    how i access the ip address??? i getting error when i access the ip address "the site can't be reached"
    please help

  • @alayehushimtube2010
    @alayehushimtube2010 4 года назад

    how can I found ESP8266 wifi module on proteus8 professional?

  • @walkaboutlights4387
    @walkaboutlights4387 3 года назад

    By any chance does anyone have any code to assign a static address and not dhcp? Also can you show us how one could add a switch and have the url display status off said switch?

  • @chickendinner7733
    @chickendinner7733 4 года назад

    Hye...Can i Know what app That U Use To Control?

  • @narut99
    @narut99 6 лет назад

    Hi
    Does the board can execute the sketch if it s unplugged form the pc an plugged with the dc power supply?

  • @KM6VV
    @KM6VV 6 лет назад +1

    Thanks for the video! First time with ESP8266.
    Text on phone is really small. How do I make it bigger? I know it's HTML.

  • @didiersee
    @didiersee 5 лет назад

    Hello congratulations from Belgium. Everything works I tested. How can I make the text bigger on the web page of my Android 192.168.1.XX smartphone because the text is too small. thank you

  • @DeViLsCrEaTiOn
    @DeViLsCrEaTiOn 4 года назад

    Hi, I have a question. can i power up a 5 volt 4 channel relay module with a 5 volt 0.7-0.8 mAh wall type charger, which is basically use for charge the simple mobiles.
    If yes, then how i connect, i mean what will be the circuit diagram. which wire will be connect with the vcc and which wire connect with the ground and which wire is connect with the ESP8286.
    OR,
    ESP8266 nodeMCU board 3.3volt is sufficient for 4 channel 5 volt relay?
    i am try to built a home automation project.
    Thank you very much. Please help me

  • @KM6VV
    @KM6VV 6 лет назад

    I'm on my network fine, but my router doesn't properly find the IP address of the ESP in the NAT list for the firewall. Any Ideas?

  • @zeuzvaldez1412
    @zeuzvaldez1412 5 лет назад

    how can we install the library

  • @dwpetty3723
    @dwpetty3723 7 лет назад

    I have been using this setup, but the wifi on the WeMos goes into sleep mode then you cant
    access it thru the phone, unless you hit the reset button to wake it up, any way to keep it active?

    • @learnelectronics
      @learnelectronics  7 лет назад

      dwpetty3723 you can try this:
      if (WiFi.status() == 6) { ESP.reset(); }
      it checks to see if your WiFi is disconnected (status 6) and restarts if it is.

    • @dwpetty3723
      @dwpetty3723 7 лет назад

      I tried the code in the loop, still does not work, this happens on my computer browser as well as my Iphone browser. so it must be the WeMos board, my other wifi devices in the house work fine, hopefully somebody will have an answer. thanks for the reply

    • @learnelectronics
      @learnelectronics  7 лет назад

      dwpetty3723 I'm sorry I couldn't help, Im a hardware guy. I muddle through programming by the seat of my pants. Find Brian Lough on RUclips. He's an Irish RUclipsr, very well versed in the 8266. He's a cool guy, send him a pm.

  • @hoezyyy
    @hoezyyy 6 лет назад

    right after the flashing the relay goes to ON
    and it is not possible to turn in off in the browser
    it's like it stays constantly on and doesnt respond to inputs

    • @hoezyyy
      @hoezyyy 6 лет назад

      it works when i connect it to the 3.3v

    • @reinerrosin
      @reinerrosin 6 лет назад

      The problem is the 5V-relais used with the 3.3V ESP-logic. If you use it as described in the tutorial, you might blow your ESP8266, if you operate the relais with 3.3V it might not switch reliably. You should either use a 3.3V-relais or a circuit adapting the 3.3V logic to 5V logic.
      The tutorial holds another problem: it is using the String class to evaluate the http requests. This will fragment the memory and crash the program after running for a longer time (can be hours, days or weeks - depending on the number of requests you send)

  • @dwpetty3723
    @dwpetty3723 7 лет назад

    Not much info on how the phone was set up, did you just enter the ip address in the phone browser?

    • @learnelectronics
      @learnelectronics  7 лет назад

      dwpetty3723 yes. the serial monitor will tell you address.

  • @sarahhazwaniabdulrahman1666
    @sarahhazwaniabdulrahman1666 5 лет назад

    Hello, my serial monitor is not showing anything. Can someone help?

  • @petrfaldus8997
    @petrfaldus8997 4 года назад

    Can you add library please.

  • @irfanfaiz4464
    @irfanfaiz4464 4 года назад +1

    Can't the switch set timer

  • @profcovfefe
    @profcovfefe 6 лет назад

    What about an implementation of the BLYNK service as a way to control the lights or devices via Google Home, Alexa...
    Great work, keep it up

    • @learnelectronics
      @learnelectronics  6 лет назад

      I don't understand what you are asking. Do you mean to use BLYNK in place of Alexa or Google? Or use BLYNK in conjunction with them?

  • @Jortsa
    @Jortsa 5 лет назад

    Hello,good video! I would like to create wifi or bluetooth controlled relay what has battery inside or needs very low woltage.Its going to be in my dirtbile which has no power lines.I would use it to start and stop it.For stopping it connect one wire to ground and for starting connects one to plus.T.jorma

  • @harithluqman1926
    @harithluqman1926 7 лет назад

    PIR Motion Sensor
    this is sensor sir

  • @roberthopewell7246
    @roberthopewell7246 5 лет назад

    When I try to verify this code, the arduino IDE gives this one error:
    Wifi_ESP8266_2:18:14: error: 'd5' was not declared in this scope
    int ledPin = d5;
    Any suggestions?

  • @matteopisanello7787
    @matteopisanello7787 5 месяцев назад

    how could i obtain the wan ip address in order to control the board in remote?

  • @manofmesopotamia7602
    @manofmesopotamia7602 4 года назад

    the only missing thing is: you did not explain how to open Arduino IDE , and which board to choose. thank you so much

  • @fredlllll
    @fredlllll 7 лет назад

    while thats cool its a bit overkill :P for my uses a simple 433 Mhz remote was enough (switching my stereo that i built from china parts). i might have to create an internet activated switch for my computer though one day. that way i could work on my computer even when im not at home

    • @learnelectronics
      @learnelectronics  7 лет назад +1

      you software engineers, always wanting to write a program for this, an app for that lol

    • @fredlllll
      @fredlllll 7 лет назад +1

      we need employment too :P

  • @JamesSmith-hg1ei
    @JamesSmith-hg1ei 5 лет назад

    What library did you use for this code

  • @kornshadow097
    @kornshadow097 Год назад

    Cool
    How can you integrate this into smart life app?

  • @bbnCRLB
    @bbnCRLB 4 года назад +2

    7:40 It's more html mumbo jumbo.

  • @justfuu3033
    @justfuu3033 5 лет назад

    is it possible if i switch Arduino WeMos to be Arduino Uno R3 ?

    • @learnelectronics
      @learnelectronics  5 лет назад

      R3 has no WiFi

    • @justfuu3033
      @justfuu3033 5 лет назад

      @@learnelectronics even if i combine R3 with ESP8266 ??

    • @learnelectronics
      @learnelectronics  5 лет назад

      You could. But for all that work.... Why not just use 8266?

    • @justfuu3033
      @justfuu3033 5 лет назад

      Learnelectronics is waiting ... what? what do you mean "only use 8266"? ... do you mean if I use uno R3 I have to combine it with esp8266 which is basically R3 and 8266 separately (not one module) and if I use weMos I don't need to combine it with esp8266 because weMos already has esp8266 on Arduino itself?

  • @iztokramljak
    @iztokramljak 7 лет назад +2

    "HTTP mumbo jumbo" hahahah ;)