Introduction: How to Use NRF24L01+ Module
I have searched the web for a good tutorial on how to use the NRF24L01 wireless transmitter and receiver but was unsuccessful. So after 2 weeks and the help of a friend I finally got it to work! I hope your experience is not as painful and confusing as mine was and this tutorial can hopefully help you get your projects working faster.
In this project I used my universal arduino controller and a robot I through together with spare parts I had sitting around. But all you really need is two arduinos and a set of NRF chips.
Parts List (more in depth)
- Arduino Uno - https://www.sainsmart.com/sainsmart-uno-r3-atmega328p-development-board-compatible-with-arduino-uno-r3-product.html
- NRF24L01+ - https://www.sainsmart.com/nrf24l01-wireless-transceiver-module-2-4ghz-ism-band.html
- L298N Motor Controller - https://www.sainsmart.com/sainsmart-l298n-dual-h-bridge-stepper-motor-driver-controller-board-module-for-arduino-robot.html#customer-reviews
- 12V power supply (power for the robot)
Step 1: NRF24L01+ the Basics
*** IMPORTANT ~ Without the base attachment the NRF24L01+ power will attach to the 3.3v on the arduino. With the base chip attached it attaches to the 5v. ***
Step 2: The Controller
I used my universal arduino controller and wrote some simple code to control it. The controller connects to pins (9, 10) instead of pins (7, 8). The code tells it to send a 1 if one button is pressed and a two if the other is pressed and a three, both combined, if both are pressed.
Step 3: Robot!
This robot uses L298N library and the RF24 library to control the two 12 volt motors. This script reads the sent value of 0 - 3 and acts accordingly.