Web Controlled Servo Motor

Web Controlled Servo using Arduino and Wi-Fi

INTRODUCTION

In this post we are going to control a Servo Motor using a web browser with the help of Arduino and Wi-Fi module ESP8266. The ESP8266 will establish a connection between the servo and the web browser through the IP address and then by moving the Slider on the web page, the servo will move accordingly. Even by setting Port Forwarding in your router, you can control the Servo from anywhere in the world over the internet, we will explain that later in this tutorial.

How to run it:

To run it, you will have to make an HTML file that will open a web page. For that, you will have to copy below given HTML code (check downwards) and save it in a notepad. There should be ‘.html’ at the end of the file, means file must be saved with ‘.html’ extension. So, if you want to name the file as ‘servo’ then it should be as ‘servo.html’ so that it can be easily get opened in the web browser.
After this, you will have to place the jQuery file in the same folder where you have placed the html file. , extract this zip file and use them directly. jQuery is the library of Java Script which has many JS functions which makes DOM manipulation (Document Object Model), event handling and use of Ajax easy-to-use.
Now open the html file in the web browser, it will look like this.



Required Components:

The components used in this project are as follows
  • Servo (sg90)
  • Arduino Uno
  • Wi-Fi module ESP8266
  • Three 1K resistors
  • Connecting wires





0 Comments