Go Down

Topic: Controlling arduino pins via ESP8266 ESP-01 ESP01 wifi module (Read 159 times) previous topic - next topic

wellnesscookie

Greetings,

I am very new at arduino, and not long ago, we started teaching it in school. We already got to work on some project, and we would like too make our arduino control a few output pins via wifi.

To be more exact, we would like to create a mobile app that will with a press of a specific button tell arduino to do something (Simple turning on the wired cooler to it or so). I have seen some wifi modules over the internet like  ESP8266 ESP-01 ESP01 and some WIFI shields as well.

What I would like to ask, is that even possible and if it is, which one should I get? I would like either the first module or wifi shield to act as a router for mobile devices. They connect to it and I am able to send some requests from my phone to my arduino, and vice versa. If it's not possible for those modules to act as routers, am I able to connect them to the real router of mine and then make a connection:

1. Mobile  <-> Router <-> Wifi module ESP8826 (or shield)
2. Mobile <-> Wifi module (or shield)

I am okay with any. I would also be very thankful if someone could also recommend me a few modules/ shields I could use for this.

Thanks in advance!

Robin2

The ESP8266 is a combination of a microprocessor and WiFi. You can program it with the Arduino IDE and if you do not need very many I/O pins you would not need to use a regular Arduino board with it. The ESP8266 microprocessor is a lot faster and has a lot more memory than an Uno or Mega.

You can buy the ESP8266 as a bare module in a few different configurations but it would probably be more convenient to buy something like the Wemos D1 board or a similar device.

If you want more info have a look on the ESP8266 Forum.

If you do want to use an ESP8266 in conjunction with an Arduino board then the usual arrangement is to establish a serial connection between them.


...R
Two or three hours spent thinking and reading documentation solves most programming problems.

wellnesscookie

#2
Jan 14, 2020, 04:43 pm Last Edit: Jan 14, 2020, 04:44 pm by wellnesscookie
The ESP8266 is a combination of a microprocessor and WiFi. You can program it with the Arduino IDE and if you do not need very many I/O pins you would not need to use a regular Arduino board with it. The ESP8266 microprocessor is a lot faster and has a lot more memory than an Uno or Mega.

You can buy the ESP8266 as a bare module in a few different configurations but it would probably be more convenient to buy something like the Wemos D1 board or a similar device.

If you want more info have a look on the ESP8266 Forum.

If you do want to use an ESP8266 in conjunction with an Arduino board then the usual arrangement is to establish a serial connection between them.


...R
Okay, thanks, I partially understood. But I would like to know if I connect the module to my Arduino UNO, will I be able to somehow set it up to act as a router access point for my mobile phone to control it? Or even better, if they could talk via a 3rd router?

zoomkat

I've got two WeMOS D1 boards (~$4 china, ~$7 USA) with the 8266 wifi chip, and they are very simple to use. They have the basic functionality of an UNO board, but maybe fewer I/O pins. The below link shows some typical stuff. I'm not sure they can function as a router, but can act as an access point and connect easily to an existing wireless router.

https://randomnerdtutorials.com/?s=web+server
 
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Robin2

But I would like to know if I connect the module to my Arduino UNO, will I be able to somehow set it up to act as a router access point for my mobile phone to control it? Or even better, if they could talk via a 3rd router?
In general, yes. The ESP8266-01 comes with a program installed that allows the Arduino to control the WiFi by sending (and receiving) messages using a serial connection. There should be plenty of information on the ESP8266 Forum and the Forum has links to a book about the ESP8266 that you can download for a small fee.

However if you want to develop a complex web application it may be easier to do it on the ESP8266 itself, and the ESP8266-01 is probably the least convenient for that as it has very few I/O pins.

Also, follow up what is in Reply #3

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

noiasca

Code: [Select]

I would like either the first module or wifi shield to act as a router for mobile devices.


The ESP8266 can either be connected to a wifi provided by your router or
the ESP8266 can span its own wifi/providing a network for your mobile. In that case the mobile will get an IP via DHCP from the ESP8266 and you connect directly to the ESP.

As mentioned already, the ESP8266 can be programmed in the Arduino IDE, very similar to the UNO.
There are Beginner-Friendly variants with more Pins and built in USB like Wemos D1 or NodeMCU.
If you still need more pins, you can use I2C PIN Port expanders, or even another UNO as slave on the I2C Bus.

how to react on postings:
- post helped: provide your final sketch, say thank you & give karma.
- post not understood: Ask as long as you understand the post
- post is off topic (or you think it is): Stay to your topic. Ask again.
- else: Ask again.

Go Up