How to program 802.11bgn Wifi Module?

2022-01-02/ By Admin

RTOS with ESP32: How to Program Multitasking

If you're reading this post, you've most likely already checked out our post on the theory behind the 802.11bgn wifi module. If not, don't waste your time and go to learn more about this wonderful tool that is the Real-Time Operating System!

Once that's done, we'll show you what ESP32's features are within real-time programming. If the reader is not familiar with the ESP32 component, it is wise to check our explanation about its functioning and its application in the programming environment. Just click on the links below.

So that's it! Want to flash another LED at a different interval? Just create another task and relax while the planner takes care of executing both.

Creating a single task802.11bgn Wi-Fi module

You can also create tasks that run only once. These types of tasks don't need an endless for (; 😉 loop; instead, they look like this:

802.11 ac USB wifi modules

Project 802.11bgn Wi-Fi module

This post publishes in the spring, and we are already approaching summer, the hottest time of the year. And, therefore, our blog decides to develop a project aimed precisely at helping our readers to get through this heat in the most comfortable as possible. And of course, with the help of the 802.11bgn Wi-Fi module.

In this post, we will develop a project that contains two tasks, which perform simultaneously by the two ESP32 cores. The first task will be to automate the control of a fan from the ambient temperature. And the second task develops a daily reminder to drink water.

This project is extremely beneficial

This project is extremely beneficial especially for those who are doing home office or distance learning. As it allows the reader to fully focus on work/study without worrying about forgetting to drink water or heat. The fan automation is also great for using at night while you sleep. During periods when the temperature drops, the fan turns itself off, saving energy.

Note: I couldn't find the correct 802.11bgn Wi-Fi module of the temperature sensor on the fritzing, this was the closest I found, however, it is not very different from the one we are using here. It has an extra thread, white, which must be ignored.

3 No basement roof slab grey structure Area

Don't forget to consider this small difference when assembling.

The red and black wires are, respectively, the positive and the negative, the same as the DS18B20, but the orange wire here is yellow in the one we're using, so don't forget to consider this small difference when assembling.

It is also important to point out that, in the part of the relay connection with the fan, an extension was made. It is possible to do this project in other ways, cutting the fan wire, for example. But that was the way chosen in this post. The following images show the extension.

802.11bgn wifi module Introduction

If you're a fan of Arduino, automation, and IOT, you're probably following the new 802.11bgn wifi module technologies on the market. And you've noticed the growing maker movement in the internet of things area. With that in mind, in this post, we bring the simplest way to install the three main WI-FI cards in the Arduino IDE.

These boards are microcontrollers with WI-FI antennas, can perform the same functions as the Arduino board, and can even be integrated into it.

There are several boards based on the 802.11bgn wifi module and ESP32 chips.

802.11bgn Wi-Fi module Materials

In addition to the boards, we are going to use some components to develop a simple recorder for ESP01.

  • ESP01;
  • ESP12E;
  • NodeMCU;
  • ESP32;
  • USB Serial TTL Converter;
  • 3 resistors of 10K OHM;
  • 2 push buttons;
  • Male-female jumpers;
  • circuit jumpers;
  • Protoboard.
802.11 ac USB wifi modules 2022

Low cost and fast dissemination

As we already mentioned, the 802.11bgn wifi module is a microcontroller chip that revolutionized the motion maker for its low cost and fast dissemination. What is most striking is that it has Wi-Fi enabling the connection of various devices to the internet or local network. It performs well for many tasks, in addition to having a very stable connection.

The chip in its original form used in end products for third parties, for prototyping, and to facilitate handling, manufacturers have created modules and development boards, such as:

Most common and simplest module

The most common and simplest 802.11bgn wifi module has only control pins and two GPIOs for input and output. The TX and RX pins can be declared as digital input and output. But this way it will not be possible to make serial communication with another module or board through the pins.

ESP12E

Like the ESP01, this one derives from the 802.11BGN chip, however, it has more features. The ESP12E is commonly practice on your NodeMCU development board.

It has 22 pins, being those for power, control, communication, and GPIO's. It has an analog input from 0 to 1V and 9 analog inputs and outputs in addition to TX and RX.

More versatile than its predecessor

This small component proves to be more versatile than its predecessor, the 802.11bgn wifi module, as in addition to the classic Wi-Fi communication module. It features a system with a Dual-Core processor, hybrid Bluetooth, and multiple built-in sensors, making the construction of a system like the internet of things (IoT) much simpler and more compact.

The Arduino is very interesting for projects where it is necessary to monitor temperatures, sound, lighting, liquid flow, and the most diverse variables in our daily lives.

Use a display to monitor the variables

In most projects, we use a display to monitor the variables. And in some control projects, the magnitude of interest is not display. This creates problems in the long run, because, in cases of design errors, or possible problems, it is desirable to know in which condition the defect.

Let's think about the case of a drug storage system like insulin. Where the temperature must always be between 2°C to 8°C at the most. It would be very interesting to be able to save all the measurements. So that it is easy to assess whether the drug is in good condition.

Conclusion

Access to data in a datalogger without an 802.11bgn wifi module wireless connection is through a physical interface, which makes real-time visualization difficult. With the use of a cloud database, we have the advantage of retaining data like a Datalogger and real-time visualization.

icon_up
close_white