I'm a beginner, I'm working on a new project to light up LED with my phone (through WIFI). I'm using Arduino Uno, nRF24L01, LED, breadboard and jumpers.
I don't understand how can I program the Arduino to only turn on and off the light when I press a button in my application, and also I don't know which application supports nRF24L01 since every guide I'm looking at shows that I need TWO board - Tx and Rx. I thought nRF24L01 could enable me to control the Arduino board through WIFI, why can't I only use it as a Transmitter?
Which application can help me control the nRF24L01 (like Blynk for ESP8266)? Can I use only the code for Tx to operate the board?
Thank you
-
\$\begingroup\$ nRF24L01 is not WiFi capable \$\endgroup\$jsotola– jsotola2020年09月24日 01:35:59 +00:00Commented Sep 24, 2020 at 1:35
1 Answer 1
In practical terms you cannot really communicate from a smartphone to an nRF24L01. You'll need to use an BLE or WiFi MCU instead.
In "impractical" terms, it's true that the actual radio modulation used by the nRF24 series and by BLE is the same, as Nordic Semiconductor was involved in writing the BLE spec. But BLE is a much more complicated protocol and not only does some things in contrasting ways that require quite a bit of software pre-juggling, it also tends to use packets larger than will fit the nRF24 chip's packet buffer.
There's relatively straightforward code out there which you can find with a search engine which uses an nRF24 to transmit short packets which can be received by the BLE capability of a phone. But that's not really the direction you want (and the packets have to be shorter than those of the iBeacon scheme often used for unidirectional transmissions).
I think some of the reflash-toy-drones projects have looked at trying to receive carefully tailored BLE packets with various nRF24 competitors like the XN297, and while you can look those up to see if they ultimately had any success, the reality is that it's not remotely an introductory level project - and they're not targeting an nRF24 chip anyway.
If you want to reasonably get somewhere with the project, replace your Arduino Uno with an nRF51 or nRF52 series BLE MCU with corresponding Arduino BSP, or an ESP8266 or ESP32 with that corresponding Arduino BSP.
-
\$\begingroup\$ thank you for your comment, I will replace it with ESP32. Do you know which app is suitable for controlling ESP32? I saw that I can use telegram bot to control it, are there any simpler alternatives? I've tried using Blynk, but there's no "ESP32" option there, only "ESP8266" \$\endgroup\$user14092875– user140928752020年09月23日 17:48:38 +00:00Commented Sep 23, 2020 at 17:48
-
1\$\begingroup\$ I'd start with whatever is recommended by the example code you use for the ESP32 side of BLE. IIRC Espressif has an app available both in the stores and as source, though that may be tied to an ESP-IDF rather than Arduino approach; presumably an Arduino code you start with will have it's own recommendation, too - Adafruit for example has a BLE experimentor sort of app, then there's LightBlue. Keep in mind that requesting recommendations for offsite resources is off topic. \$\endgroup\$Chris Stratton– Chris Stratton2020年09月23日 17:50:53 +00:00Commented Sep 23, 2020 at 17:50