nRF24L01 with NodeMCU

The NodeMCU is a very versatile card for those who want to work with Internet of Things, by itself, it has a complete WiFi interface. However, in some more complex projects, there is a need to integrate this card with another wireless connection solution, one of them, the nRF24L01, is another very popular device in the field. So, let's connect them.

Figure 1 - NodeMCU pinout

To make this connection, we will use the article NRF24L01 with Arduino as the basis, the only difference will be in the pinout between nRF24L01 and NodeMCU. Remember that NodeMCU has a pin assignment distinct from Arduino, for that, use Figure 1 to see the correct reference (Gray names are in NodeMCU and blue ones are the corresponding ones in Arduino), to use Arduino IDE.

What I need for this article:
  • 1x - NodeMCU 1.0 ESP-12E Module
  • 1x - Arduino
  • 2x - nRF24L01
In this article I am taking into account that you have already configured your machine, with the NodeMCU drive and the Arduino IDE and the necessary libraries to work with NodeMCU.

Connect the two modules following Figure 2:

Figure 2 - Connecting nRF24L01 to NodeMCU

For simplicity, connect an nRF24L01 to the Arduino and configure it as the transmitter (Follow article NRF24L01 with Arduino) and connect the other nRF24L01 to NodeMCU, as previously described, this will serve as the receiver. For him, use the following code:

You may have noticed, that the receiver code used in article  NRF24L01 with Arduino  is very similar to that used with NodeMCU, what changes is just the pinout. Therefore, to configure the transmitter, follow the same logic.
nRF24L01 with NodeMCU nRF24L01 with NodeMCU Reviewed by AJ Alves on domingo, agosto 12, 2018 Rating: 5

Nenhum comentário:

Tecnologia do Blogger.