Using ESP-01 and Arduino to creater Browser controlled Servo mechanism

Thread Starter

deepakdpadhi

Joined Sep 29, 2018
19
Hello everyone,

I have an ESP-01 along with an Arduino Uno . What I want to do is allow a device to connect to the ESP01 and through a sort of browser interface (a couple of buttons or so), be able to control the GPIO on the Arduino. I am a beginner in terms of using wifi modules.

Any tutorials/documentation would be apppreciated.

Thanks in advance
 

djsfantasi

Joined Apr 11, 2010
7,870
Is the browser going to be local or remote? It makes a difference. But, I’ve done something like this on a different platform.

I’m going to assume the two devices are local.

In my case, I created a web server, to which the browser connected. The browser sent a message to the server, which was then parsed to identify the desired action.

The trick with WiFi is that you are going to get into IP networking. It will be a lot easier if the ESP01 web server has a static IP address.

Remote control is possible, but issues of DNS, routing and firewalls come into play.

To summarize:
  1. You need a web server on the EDP01/Arduino. (other services are possible - like Telnet - but web services are simplest for your project)
  2. You need to code the site to transmit messages when the appropriate button is pressed.
  3. You need to parse those messages (can be simple if the messages are simple)
  4. You need to code for each action.
 

Thread Starter

deepakdpadhi

Joined Sep 29, 2018
19
Is the browser going to be local or remote? It makes a difference. But, I’ve done something like this on a different platform.

I’m going to assume the two devices are local.

In my case, I created a web server, to which the browser connected. The browser sent a message to the server, which was then parsed to identify the desired action.

The trick with WiFi is that you are going to get into IP networking. It will be a lot easier if the ESP01 web server has a static IP address.

Remote control is possible, but issues of DNS, routing and firewalls come into play.

To summarize:
  1. You need a web server on the EDP01/Arduino. (other services are possible - like Telnet - but web services are simplest for your project)
  2. You need to code the site to transmit messages when the appropriate button is pressed.
  3. You need to parse those messages (can be simple if the messages are simple)
  4. You need to code for each action.
Well, I figured out how to perform the steps you summarized. But I ran into another problem. I was assuming that this device - https://github.com/SmartArduino/SZDOITWiKi/wiki/ESP8266---TTLtoWiFi was the same as an ESP01. I tried running the AT command via serial monitor(RX and TX attached to RX and TX of arduino but ended up not being able to upload any code or receiving any answer to the AT command (should have been OK).
If you could help me out with this, I'd be very thankful.
The exact error was :
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
 

djsfantasi

Joined Apr 11, 2010
7,870
This is a common problem and may have many reasons. Perform a search on the phrase “programmer is not responding”.

Make sure that within the IDE, you have selected the correct port and device. Unplug everything, exit the IDE and start over. Read the search replies.
 

Thread Starter

deepakdpadhi

Joined Sep 29, 2018
19
This is a common problem and may have many reasons. Perform a search on the phrase “programmer is not responding”.

Make sure that within the IDE, you have selected the correct port and device. Unplug everything, exit the IDE and start over. Read the search replies.
what would be the correct device in my case as given above - the ESP8266 or the Arduino Uno?
 

djsfantasi

Joined Apr 11, 2010
7,870
I suspect the Arduino.

Actually, I am referring specifically to the Arduino.

Are you trying to program the Arduino? I’m not sure about the ESP01, but I know the Arduino IDE uses avrdude to program the Arduino.

Before you can use AT commands on the ESP01, your code needs to establish and validate a serial connection to the EDP01. And importantly, the ESP01 needs to be put into AT mode by setting the enable pin low.
 

Thread Starter

deepakdpadhi

Joined Sep 29, 2018
19
I suspect the Arduino.

Actually, I am referring specifically to the Arduino.

Are you trying to program the Arduino? I’m not sure about the ESP01, but I know the Arduino IDE uses avrdude to program the Arduino.

Before you can use AT commands on the ESP01, your code needs to establish and validate a serial connection to the EDP01. And importantly, the ESP01 needs to be put into AT mode by setting the enable pin low.
You are sure that the Enable pin needs to be low for it to work in AT mode?
 
Top