Wemos D1 ESP8266 Board als Webserver

Wemos D1 ESP8266 Board als Webserver

Mit dem nachfolgendem Sketch betreiben Sie den Wemos DA ESP8266 im WiFi als Webserver.

In dem Sketch wird eine feste IP vergeben. Ich finde das immer angenehmer wie dynamische Vergabe.

    #include <ESP8266WiFi.h>
const char* ssid = "DEINE_SSID";
const char* password = "DEIN_PASSWORT";
int ledPin = D5;
WiFiServer server(80);
void setup() {
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
  // Connect to WiFi network
  Serial.print("Connecting to ");
WiFi.begin(ssid, password);
  IPAddress ip(192, 168, 187, 52); // Feste IP vergeben
  IPAddress gateway(192, 168, 1, 1);
  IPAddress subnet(255, 255, 0, 0);
  IPAddress dns(192, 168, 1, 1);
  WiFi.config(ip, dns, gateway, subnet);
  while (WiFi.status() != WL_CONNECTED) {
  Serial.println("WiFi connected");
  // Start the server
  Serial.println("Server started");
  // Print the IP address
  Serial.print("Use this URL : ");
void loop() {
  // Check if a client has connected
  WiFiClient client = server.available();
  if (!client) {
  // Wait until the client sends some data
  Serial.println("new client");
  // Read the first line of the request
  String request = client.readStringUntil('\r');
  // Match the request
  int value = LOW;
  if (request.indexOf("/LED=ON") != -1) {
    digitalWrite(ledPin, HIGH);
    value = HIGH;
  if (request.indexOf("/LED=OFF") != -1){
    digitalWrite(ledPin, LOW);
    value = LOW;
  // Return the response
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/html");
  client.println(""); //  do not forget this one
  client.println("<!DOCTYPE HTML>");
  client.print("Led pin is now: ");
  if(value == HIGH) {
  } else {
  client.println("Click <a href=\"/LED=ON\">here</a> turn the LED on pin 5 ON<br>");
  client.println("Click <a href=\"/LED=OFF\">here</a> turn the LED on pin 5 OFF<br>");
  Serial.println("Client disconnected");
Tobias Guggenberger

86 Kommentare

windows loader tidak berhasil Veröffentlicht am9:52 am - Jan 26, 2021

This is my first time go to see at here and i am genuinely impressed to read everthing at single place.|


adidas yeezy Veröffentlicht am6:14 am - Jan 26, 2021

My spouse and i felt very excited when Albert could do his basic research from the precious recommendations he came across from your very own weblog. It is now and again perplexing to just find yourself giving freely procedures which usually other folks could have been trying to sell. And we fully grasp we have the blog owner to appreciate for this. These explanations you have made, the easy blog menu, the friendships your site assist to foster – it’s got many remarkable, and it’s leading our son in addition to our family do think that issue is amusing, and that’s quite essential. Thanks for everything!
adidas yeezy http://www.adidasyeezysupply.com

Kathe Swentzel Veröffentlicht am4:15 am - Jan 25, 2021

Hi! This post could not be written any better! Reading this post reminds me of my previous room mate! He always kept talking about this. I will forward this write-up to him. Pretty sure he will have a good read. Many thanks for sharing!|


LbgAncef Veröffentlicht am11:47 pm - Jan 24, 2021

overnightpharmacy4u brand viagra use paypal to buy viagra? buy viagra sildenafil [url=http://genqpviag.com/]generic viagra au[/url] ’

vidalista without a doctor prescription Veröffentlicht am1:27 pm - Jan 24, 2021

vidalista without a doctor prescription http://vidallista.com/

sildenafil no prescription Veröffentlicht am5:16 am - Jan 24, 2021

sildenafil no prescription https://zsildenafil.com/

activate windows in settings Veröffentlicht am11:18 pm - Jan 23, 2021

I am really impressed along with your writing talents and also with the format in your blog. Is this a paid theme or did you customize it your self? Anyway stay up the excellent high quality writing, it’s rare to see a nice weblog like this one nowadays..|


Tinder dating site Veröffentlicht am6:26 pm - Jan 23, 2021

tinder website , tinder dating app https://tinderdatingsiteus.com/

engign Veröffentlicht am7:39 am - Jan 23, 2021

How can you differentiate if you induce diabetes? Most beforehand symptoms are from higher-than-normal levels of glucose, a well-wishing of sugar, in your blood. The warning signs can be so mild that you don’t perceive them female viagra without a doctor prescription. That’s especially true of typeface 2 diabetes. Some people don’t encounter into public notice they obtain it until they make problems from long-term devastation caused during the disease. With kind 1 diabetes, the symptoms usually happen quickly, in a situation of days or a few weeks [url=http://withoutprescriptions-rx.com]viagra without prescription[/url]. They’re much more austere, too.

canada goose outlet Veröffentlicht am11:53 pm - Jan 22, 2021

I enjoy you because of your whole labor on this blog. My daughter delights in working on research and it’s simple to grasp why. Most people know all relating to the lively tactic you render very helpful suggestions by means of this web blog and boost response from other people on the subject while our girl is in fact starting to learn so much. Take advantage of the rest of the new year. Your performing a glorious job.
canada goose outlet http://www.canadagoosejacket.us.org

curry 6 shoes Veröffentlicht am11:53 pm - Jan 22, 2021

I definitely wanted to compose a remark so as to say thanks to you for those marvelous items you are placing at this site. My time consuming internet research has at the end of the day been honored with brilliant points to share with my colleagues. I would express that most of us website visitors actually are definitely fortunate to dwell in a remarkable network with so many brilliant individuals with interesting advice. I feel very lucky to have used the weblog and look forward to some more entertaining minutes reading here. Thanks a lot once more for a lot of things.
curry 6 shoes http://www.curry-6.us

goyard handbags Veröffentlicht am11:52 pm - Jan 22, 2021

My husband and i have been very joyous that John managed to round up his studies through your ideas he acquired through your web site. It is now and again perplexing just to choose to be offering solutions that many most people could have been trying to sell. And we also do know we’ve got the blog owner to thank because of that. The type of illustrations you have made, the straightforward site menu, the friendships you help engender – it’s got most incredible, and it’s really leading our son in addition to our family reckon that this matter is brilliant, which is extraordinarily fundamental. Many thanks for all!
goyard handbags http://www.goyardhandbag.us

kobe shoes Veröffentlicht am11:52 pm - Jan 22, 2021

I simply wished to appreciate you yet again. I’m not certain what I would have undertaken without the information revealed by you concerning my industry. Entirely was the traumatic difficulty in my view, however , observing the specialised approach you resolved it made me to jump for gladness. I’m happier for the support and as well , believe you recognize what a great job you are always doing instructing many others through the use of a blog. I know that you haven’t come across all of us.
kobe shoes http://www.kobesneakers.com

best cialis Veröffentlicht am7:00 pm - Jan 22, 2021

best cialis http://ciaalis2u.com/

writing prescription without seeing patient Veröffentlicht am4:52 pm - Jan 22, 2021

writing prescription without seeing patient https://buymeds.mlsmalta.com/

writing prescription without seeing patient Veröffentlicht am4:52 pm - Jan 22, 2021

writing prescription without seeing patient https://edmeds.buszcentrum.com/

windows 8 activator password Veröffentlicht am3:44 pm - Jan 22, 2021

Very good write-up. I definitely appreciate this site. Stick with it!|


windows 8.1 loader download rar Veröffentlicht am11:06 pm - Jan 21, 2021

Hi! Do you know if they make any plugins to assist with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results. If you know of any please share. Many thanks!|


windows activator for windows 8.1 Veröffentlicht am12:50 am - Jan 20, 2021

Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?|


kd 12 Veröffentlicht am8:15 pm - Jan 19, 2021

My spouse and i got quite glad that Michael managed to do his reports while using the precious recommendations he received using your site. It’s not at all simplistic just to possibly be handing out tips and hints which usually people have been selling. We keep in mind we have got you to be grateful to for that. All of the illustrations you’ve made, the straightforward site menu, the relationships you can make it possible to instill – it’s got many spectacular, and it’s really aiding our son and the family feel that the topic is excellent, which is pretty vital. Thank you for all!
kd 12 http://www.kd12.org

yeezy boost 350 v2 Veröffentlicht am8:15 pm - Jan 19, 2021

Thank you so much for giving everyone a very remarkable opportunity to read in detail from this site. It can be so pleasing and also jam-packed with amusement for me and my office peers to search your website no less than three times a week to find out the new tips you will have. Of course, I’m so usually fascinated considering the unique things served by you. Some 2 tips on this page are in reality the most beneficial I’ve ever had.
yeezy boost 350 v2 http://www.yeezy350boostv2s.us

supreme hoodie Veröffentlicht am8:14 pm - Jan 19, 2021

I precisely needed to thank you so much all over again. I am not sure the things that I might have tried in the absence of the entire tips and hints provided by you about that area. It was the horrifying condition for me, but being able to view a new professional fashion you solved it took me to jump for contentment. I will be happy for the guidance as well as have high hopes you know what a powerful job you were doing instructing others with the aid of your web site. I know that you have never encountered all of us.
supreme hoodie http://www.supreme.us.org

cialis by mail mexico Veröffentlicht am4:22 pm - Jan 19, 2021

cialis by mail mexico https://tadalafil.cleckleyfloors.com/

windows 7 ultimate activator youtube Veröffentlicht am11:38 am - Jan 19, 2021

You need to be a part of a contest for one of the highest quality sites on the internet. I most certainly will highly recommend this blog!|


Tennille Hatley Veröffentlicht am8:42 pm - Jan 18, 2021

Thanks on your marvelous posting! I seriously enjoyed reading it, you will be a great author.I will be sure to bookmark your blog and definitely will come back at some point. I want to encourage one to continue your great writing, have a nice day!


windows loader 2.2.1 free download Veröffentlicht am2:27 pm - Jan 18, 2021

I do not even know how I ended up here, but I thought this post was great. I do not know who you are but certainly you are going to a famous blogger if you are not already 😉 Cheers!|


Shannon Banzhaf Veröffentlicht am8:34 am - Jan 18, 2021

In this grand scheme of things you actually get a B+ with regard to effort and hard work. Exactly where you confused me personally ended up being on your particulars. As as the maxim goes, details make or break the argument.. And that couldn’t be much more correct here. Having said that, allow me say to you what exactly did work. Your writing can be really engaging and this is probably the reason why I am making an effort in order to comment. I do not really make it a regular habit of doing that. 2nd, even though I can easily see the jumps in logic you make, I am not necessarily confident of just how you seem to connect your details which inturn make the final result. For now I will, no doubt subscribe to your position but hope in the foreseeable future you connect your facts better.


Theo Ping Veröffentlicht am9:29 am - Jan 17, 2021

Yes! Finally someone writes about keyword1.|


Desirae Cance Veröffentlicht am3:11 pm - Jan 16, 2021

whoah this weblog is excellent i really like reading your posts. Keep up the great work! You realize, lots of people are looking around for this info, you can aid them greatly. |


superbeets review Veröffentlicht am7:56 am - Jan 16, 2021

We are a group of volunteers and starting a new scheme in our community. Your site offered us with valuable information to work on. You have done a formidable job and our entire community will be grateful to you.|
superbeets review http://gunzblazing.com/hit.php?w=104026&s=10&p=2&c=&t=&cs=&tool=7&show_extra=1&u=https%3A%2F%2Fccm.net%2Fprofile%2Fuser%2Fsuperbeets32

Kylee Hodor Veröffentlicht am1:06 am - Jan 16, 2021

Do you have a spam issue on this blog; I also am a blogger, and I was wanting to know your situation; many of us have created some nice procedures and we are looking to swap strategies with others, be sure to shoot me an email if interested.|


engign Veröffentlicht am7:29 pm - Jan 15, 2021

How can you blab if you induce diabetes? Most at the crack symptoms are from higher-than-normal levels of glucose, a obliging of sugar, in your blood. The admonition signs can be so non-violent that you don’t perceive them viagra without a doctor prescription. That’s noticeably actual of genus 2 diabetes. Some people don’t bump into uncover unserviceable they be enduring it until they vex problems from long-term damage caused by the disease. With group 1 diabetes, the symptoms all things considered transpire quickly, in a occurrence of days or a infrequent weeks [url=http://withoutprescriptions-rx.com]rx online no prior prescription[/url]. They’re much more severe, too.

Fumiko Omland Veröffentlicht am1:30 pm - Jan 15, 2021

After I originally left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get 4 emails with the same comment. There has to be a way you can remove me from that service? Thanks!|


vidalista generic tadalafil Veröffentlicht am8:42 am - Jan 15, 2021

vidalista generic tadalafil https://vidalista.mlsmalta.com/

Aleshia Hadfield Veröffentlicht am2:57 am - Jan 15, 2021

Wow, awesome blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is excellent, as well as the content!|


Dylan Toborg Veröffentlicht am9:30 pm - Jan 14, 2021

Howdy! Do you use Twitter? I’d like to follow you if that would be okay. I’m absolutely enjoying your blog and look forward to new posts.|


Quiana Madera Veröffentlicht am7:25 am - Jan 14, 2021

Every weekend i used to go to see this website, as i wish for enjoyment, as this this site conations genuinely nice funny information too.|


Jarred Dings Veröffentlicht am10:39 pm - Jan 13, 2021

You really make it seem so easy with your presentation but I find this topic to be actually something that I think I would never understand. It seems too complex and extremely broad for me. I am looking forward for your next post, I will try to get the hang of it!|


Desirae Neihoff Veröffentlicht am11:47 am - Jan 13, 2021

Hello i am kavin, its my first time to commenting anywhere, when i read this piece of writing i thought i could also make comment due to this good post.|


Reiko Missel Veröffentlicht am7:42 am - Jan 13, 2021

We stumbled over here from a different page and thought I should check things out. I like what I see so i am just following you. Look forward to finding out about your web page again.


Erasmo Capinpin Veröffentlicht am4:50 am - Jan 13, 2021

This design is steller! You definitely know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job. I really loved what you had to say, and more than that, how you presented it. Too cool!


Gwyneth Merren Veröffentlicht am4:41 am - Jan 13, 2021

Awesome site you have here but I was curious if you knew of any discussion boards that cover the same topics talked about here? I’d really like to be a part of community where I can get opinions from other knowledgeable people that share the same interest. If you have any suggestions, please let me know. Many thanks!


Epifania Markin Veröffentlicht am8:35 pm - Jan 12, 2021

This article offers clear idea for the new visitors of blogging, that truly how to do blogging and site-building.|


Soo Giunta Veröffentlicht am5:52 pm - Jan 12, 2021

I am not sure where you’re getting your info, but good topic. I needs to spend some time learning much more or understanding more. Thanks for fantastic information I was looking for this info for my mission.


Jesusita Miko Veröffentlicht am6:31 am - Jan 12, 2021

I always emailed this web site post page to all my associates, for the reason that if like to read it next my friends will too.|


Deloris Seifert Veröffentlicht am2:21 am - Jan 12, 2021

Right now it appears like Movable Type is the top blogging platform out there right now. (from what I’ve read) Is that what you’re using on your blog?|


Tom Blue Veröffentlicht am5:20 pm - Jan 11, 2021

Hey there, You’ve done an incredible job. I’ll definitely digg it and personally suggest to my friends. I am confident they’ll be benefited from this site.|


Marcella Nevarez Veröffentlicht am8:16 am - Jan 11, 2021

If some one desires to be updated with hottest technologies afterward he must be go to see this web page and be up to date all the time.|


Donette Paules Veröffentlicht am2:30 am - Jan 11, 2021

Yes, this is a Good one


Kit Oblinski Veröffentlicht am6:17 pm - Jan 10, 2021

Thanks for any other magnificent article. The place else could anyone get that type of information in such an ideal approach of writing? I’ve a presentation subsequent week, and I am at the search for such info.|


cialis without a doctor prescription Veröffentlicht am1:59 pm - Jan 10, 2021

cialis without a doctor prescription http://cialllis.com/

Chung Soper Veröffentlicht am4:05 am - Jan 10, 2021

Hi to every body, it’s my first visit of this blog; this webpage carries awesome and in fact fine data for readers.|


Gerardo Venner Veröffentlicht am2:09 am - Jan 10, 2021

Once I originally commented I clicked the -Notify me when new feedback are added- checkbox and now each time a comment is added I get 4 emails with the identical comment. Is there any manner you can remove me from that service? Thanks!


Barrie Suyama Veröffentlicht am7:05 pm - Jan 9, 2021

Currently it sounds like Drupal is the preferred blogging platform out there right now. (from what I’ve read) Is that what you are using on your blog?|


doxepin no rx Veröffentlicht am2:39 pm - Jan 9, 2021

I precisely desired to say thanks again. I’m not certain the things I could possibly have achieved in the absence of the basics contributed by you about my area of interest. Completely was a challenging circumstance for me, but being able to view a expert avenue you dealt with it forced me to cry for contentment. Extremely grateful for the advice and believe you are aware of a powerful job that you’re accomplishing educating many people all through a site. I’m certain you’ve never come across all of us. https://sinequandoxepin.com/#

Gerry Laite Veröffentlicht am1:33 pm - Jan 9, 2021

My brother recommended I may like this blog. He used to be entirely right. This post truly made my day. You can not imagine just how a lot time I had spent for this info! Thanks!|


Joan Hromek Veröffentlicht am2:11 am - Jan 9, 2021

all the time i used to read smaller content that as well clear their motive, and that is also happening with this paragraph which I am reading at this time.|


Gary Olk Veröffentlicht am5:07 am - Jan 8, 2021

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your blog when you could be giving us something informative to read?|


ARIPIPRAZOLE buy Veröffentlicht am3:02 am - Jan 8, 2021

I am just writing to make you understand what a outstanding experience my wife’s girl obtained using your webblog. She noticed so many pieces, which included what it is like to possess an excellent helping style to make the others without hassle thoroughly grasp various very confusing topics. You undoubtedly surpassed visitors‘ expected results. Thanks for showing those warm and friendly, trustworthy, revealing not to mention unique tips on your topic to Tanya. https://abilifyaripiprazoles.com/

who manufactures hydroxychloroquine in the us Veröffentlicht am2:54 am - Jan 8, 2021

who manufactures hydroxychloroquine in the us https://hydroxychloroquinee.com/

Malia Petrin Veröffentlicht am1:08 pm - Jan 7, 2021

Hi, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam remarks? If so how do you stop it, any plugin or anything you can advise? I get so much lately it’s driving me mad so any assistance is very much appreciated.|


Nola Ashford Veröffentlicht am3:39 am - Jan 7, 2021

Hey There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback.|


Sebrina Rubenacker Veröffentlicht am9:46 pm - Jan 6, 2021

It’s really a nice and useful piece of information. I’m happy that you shared this useful information with us. Please stay us up to date like this. Thanks for sharing.


5 mg prednisone long term Veröffentlicht am6:31 pm - Jan 6, 2021

5 mg prednisone long term https://bvsinfotech.com/

Jewell Giblin Veröffentlicht am6:23 pm - Jan 6, 2021

Hey there! This is kind of off topic but I need some help from an established blog. Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about making my own but I’m not sure where to start. Do you have any tips or suggestions? Many thanks


Denise William Veröffentlicht am4:27 pm - Jan 6, 2021

Have you ever thought about adding a little bit more than just your articles? I mean, what you say is valuable and everything. But imagine if you added some great images or video clips to give your posts more, „pop“! Your content is excellent but with pics and videos, this blog could undeniably be one of the best in its niche. Very good blog!|


Tomi Sou Veröffentlicht am9:39 am - Jan 6, 2021

world is changing


Leda Mattix Veröffentlicht am6:07 am - Jan 6, 2021

I have read so many articles or reviews about the blogger lovers however this article is actually a good article, keep it up.|


txt Veröffentlicht am8:47 pm - Jan 5, 2021

Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter and said „You can hear the ocean if you put this to your ear.“ She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!|


Rhea Veröffentlicht am4:58 pm - Jan 5, 2021

Taxi moto line
128 Rue la Boétie
75008 Paris
+33 6 51 612 712  

Taxi moto paris

Hello to every one, as I am in fact keen of reading this weblog’s post to be updated on a regular basis.
It includes nice information.

Here is my site; hey

Hung Blubaugh Veröffentlicht am7:26 am - Jan 5, 2021

Its such as you learn my thoughts! You appear to understand so much about this, such as you wrote the book in it or something. I believe that you just can do with some p.c. to power the message home a bit, however instead of that, that is great blog. A fantastic read. I’ll certainly be back.|


purchasing cefixime by mail Veröffentlicht am4:27 am - Jan 5, 2021

purchasing cefixime by mail https://ceefexime.co/

Ahmad Lurtz Veröffentlicht am3:41 am - Jan 5, 2021

Hello my friend! I wish to say that this article is amazing, nice written and come with almost all significant infos. I would like to peer extra posts like this .


Mertie Alvin Veröffentlicht am10:22 pm - Jan 4, 2021

The other day, while I was at work, my sister stole my iphone and tested to see if it can survive a 40 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is entirely off topic but I had to share it with someone!|


Stan Flom Veröffentlicht am11:07 am - Jan 4, 2021

Good day! Would you mind if I share your blog with my twitter group? There’s a lot of people that I think would really appreciate your content. Please let me know. Cheers|


ivermectina Veröffentlicht am1:04 pm - Jan 3, 2021

ivermectina http://ivermmectin.co/

Rebekah Cira Veröffentlicht am5:24 am - Jan 3, 2021



Brock Cantfield Veröffentlicht am3:16 pm - Jan 2, 2021

I was just looking for this information for some time. After 6 hours of continuous Googleing, at last I got it in your web site. I wonder what’s the lack of Google strategy that do not rank this type of informative web sites in top of the list. Normally the top web sites are full of garbage.


Bridgette Bettis Veröffentlicht am6:06 pm - Jan 1, 2021

Hello there, I discovered your blog by means of Google at the same time as looking for a comparable subject, your site came up, it seems great. I have bookmarked it in my google bookmarks.


Mignon Duffett Veröffentlicht am7:13 am - Jan 1, 2021

I’m not sure exactly why but this site is loading incredibly slow for me. Is anyone else having this issue or is it a issue on my end? I’ll check back later and see if the problem still exists.


plaquenil savings card Veröffentlicht am12:55 am - Jan 1, 2021

plaquenil savings card https://hydroxychloroquine.lm360.us/

Ardelle Decomo Veröffentlicht am5:27 am - Dez 31, 2020

Hello to every one, since I am truly keen of reading this webpage’s post to be updated regularly. It includes pleasant material.|


best amoxicillin alternatives over counter Veröffentlicht am8:28 pm - Dez 30, 2020

best amoxicillin alternatives over counter https://amoxycillin1st.com/

vidalista 2.60 mg tablet Veröffentlicht am10:59 am - Dez 30, 2020

vidalista 2.60 mg tablet http://viidalista.co/

Jorge Gail Veröffentlicht am8:25 pm - Dez 29, 2020

Thanks for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your further post thank you once again.|


Jone Laitila Veröffentlicht am12:13 am - Dez 29, 2020

hi!,I love your writing very a lot! share we keep up a correspondence extra about your article on AOL? I need an expert in this space to unravel my problem. Maybe that is you! Having a look forward to peer you. |