Share this post with a friend that also likes electronics! It depends on how much noise in your environment, if there’s any obstacles and if you’re using an external antenna. If you separate them too far you’ll loose the communication. They work very well when the receiver and transmitter are quite close to each other. You need to have some realistic expectations when using this module. On the right window, I’m using the Arduino IDE Serial Monitor. Note: On the left window, I’m establishing a serial communication with. Those messages are being displayed in the serial monitor. Here’s what you should see in your serial terminal windows (see Figure below). In this project the client is sending a message “Hello World!” to the server via RF and the server is sending back the following message “And hello back to you”. NRF24::printBuffer("request: ", buf, len) Go to File > Examples > RadioHead > nrf24 > nrf24_server. Then upload the code below which can be found in your Arduino IDE (after installing the RadioHead library). Serial.println("No reply, is nrf24_server running?") įollow the circuit above for your server. Serial.println("Sending to nrf24_server") If (!tRF(RH_NRF24::DataRate2Mbps, RH_NRF24::TransmitPower0dBm)) Defaults after init are 2.402 GHz (channel 2), 2Mbps, 0dBm RH_NRF24 nrf24(8, 7) // For RFM73 on Anarduino Mini RH_NRF24 nrf24(8, 10) // For Leonardo, need explicit SS pin RH_NRF24 nrf24(8, 7) // use this to be electrically compatible with Mirf Singleton instance of the radio driver Go to File > Examples > RadioHead > nrf24 > nrf24_client. Important: Input voltage is of 1.9V~3.6V, do not exceed this voltage, otherwise it will fry your module.įollow the circuit above for your client. Pinout Top view of NRF24L01 Client Circuit You can read more about this project here. The RadioHead library is great and it works with almost all RF modules in the market.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |