{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/1156","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/1156/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/1156/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/1156/events","html_url":"https://github.com/esp8266/Arduino/issues/1156","id":120580438,"number":1156,"title":"ESP8266 + Servo","user":{"login":"yeralin","id":8620461,"avatar_url":"https://avatars.githubusercontent.com/u/8620461?v=3","gravatar_id":"","url":"https://api.github.com/users/yeralin","html_url":"https://github.com/yeralin","followers_url":"https://api.github.com/users/yeralin/followers","following_url":"https://api.github.com/users/yeralin/following{/other_user}","gists_url":"https://api.github.com/users/yeralin/gists{/gist_id}","starred_url":"https://api.github.com/users/yeralin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeralin/subscriptions","organizations_url":"https://api.github.com/users/yeralin/orgs","repos_url":"https://api.github.com/users/yeralin/repos","events_url":"https://api.github.com/users/yeralin/events{/privacy}","received_events_url":"https://api.github.com/users/yeralin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-05T19:05:35Z","updated_at":"2015-12-13T15:10:05Z","closed_at":null,"body":"Cannot make it work.\r\n\r\nUsed example code piece: Hello World web server\r\n``` C++\r\n#include <ESP8266WiFi.h>\r\n#include <WiFiClient.h>\r\n#include <ESP8266WebServer.h>\r\n#include <ESP8266mDNS.h>\r\n#include <Servo.h>\r\nServo myservo; // ADDING LIBRARY AND INITIALIZING SERVO\r\n\r\nconst char* ssid = \"Test\";\r\nconst char* password = \"Test\";\r\n\r\nESP8266WebServer server(80);\r\n\r\nconst int led = 13;\r\n\r\nvoid handleRoot() {\r\n  digitalWrite(led, 1);\r\n  server.send(200, \"text/plain\", \"hello from esp8266!\");\r\n  digitalWrite(led, 0);\r\n}\r\n\r\nvoid handleNotFound() {\r\n  digitalWrite(led, 1);\r\n  String message = \"File Not Found\\n\\n\";\r\n  message += \"URI: \";\r\n  message += server.uri();\r\n  message += \"\\nMethod: \";\r\n  message += (server.method() == HTTP_GET) ? \"GET\" : \"POST\";\r\n  message += \"\\nArguments: \";\r\n  message += server.args();\r\n  message += \"\\n\";\r\n  for (uint8_t i = 0; i < server.args(); i++) {\r\n    message += \" \" + server.argName(i) + \": \" + server.arg(i) + \"\\n\";\r\n  }\r\n  server.send(404, \"text/plain\", message);\r\n  digitalWrite(led, 0);\r\n}\r\n\r\nvoid setup(void) {\r\n  myservo.attach(0); // ATTACHING 0 PIN (TRIED 2 and 9) NO PROGRESS\r\n  pinMode(led, OUTPUT);\r\n  digitalWrite(led, 0);\r\n  Serial.begin(115200);\r\n  WiFi.begin(ssid, password);\r\n  Serial.println(\"\");\r\n\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println(\"\");\r\n  Serial.print(\"Connected to \");\r\n  Serial.println(ssid);\r\n  Serial.print(\"IP address: \");\r\n  Serial.println(WiFi.localIP());\r\n\r\n  if (MDNS.begin(\"esp8266\")) {\r\n    Serial.println(\"MDNS responder started\");\r\n  }\r\n\r\n  server.on(\"/\", handleRoot);\r\n\r\n//BASICALLY MY THOUGHT WAS WHEN I CALL 192.168.1.X/inline\r\n//SERVO SHOULD ROTATE\r\n  server.on(\"/inline\", []() { \r\n    int pos;\r\n    for (pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees\r\n    { // in steps of 1 degree\r\n      myservo.write(pos);              // tell servo to go to position in variable 'pos'\r\n      delay(15);                       // waits 15ms for the servo to reach the position\r\n    }\r\n    for (pos = 180; pos >= 0; pos -= 1) // goes from 180 degrees to 0 degrees\r\n    {\r\n      myservo.write(pos);              // tell servo to go to position in variable 'pos'\r\n      delay(15);                       // waits 15ms for the servo to reach the position\r\n    }\r\n    server.send(200, \"text/plain\", \"this works as well\");\r\n  });\r\n\r\n  server.onNotFound(handleNotFound);\r\n\r\n  server.begin();\r\n  Serial.println(\"HTTP server started\");\r\n}\r\n\r\nvoid loop(void) {\r\n  server.handleClient();\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/164267235","html_url":"https://github.com/esp8266/Arduino/issues/1156#issuecomment-164267235","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/1156","id":164267235,"user":{"login":"Links2004","id":974709,"avatar_url":"https://avatars.githubusercontent.com/u/974709?v=3","gravatar_id":"","url":"https://api.github.com/users/Links2004","html_url":"https://github.com/Links2004","followers_url":"https://api.github.com/users/Links2004/followers","following_url":"https://api.github.com/users/Links2004/following{/other_user}","gists_url":"https://api.github.com/users/Links2004/gists{/gist_id}","starred_url":"https://api.github.com/users/Links2004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Links2004/subscriptions","organizations_url":"https://api.github.com/users/Links2004/orgs","repos_url":"https://api.github.com/users/Links2004/repos","events_url":"https://api.github.com/users/Links2004/events{/privacy}","received_events_url":"https://api.github.com/users/Links2004/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T15:10:05Z","updated_at":"2015-12-13T15:10:05Z","body":"whats the exakt problem?\r\nany serial debug log to share?\r\nwhat ESP do you use?\r\n"}}