So in our example, modem will try to send 15 times before it will stop and finds that the receiver is out of range, or is turned off. Second argument is the number of attempts. So, if the recipient does not receive data, modem will try to send them every 3.75 milliseconds. The first argument sets how often modem will retry. It shows how many times the modem will retry to the send data in case of not receiving by another modem. Next we call “ tRetires(15, 15) ” function. In the “setup” function we call the method “ radio.begin () ”. The address is necessary if you have a few modems in the network, thanks to the address, you can choose a particular modem to which you are sending the data. Address has value “00001”, but if you want you can change it to any other 5-letter string. In this array we wrote the address of the modem, that will receive data from Arduino. Then I create a global array called “ rxAddr“. If you have connected them to other pins can change this arguments. Arguments 7 and 8 are a digital pin numbers to which signals CE and CSN are connected. This object represents a modem connected to the Arduino. Next, we need to create an object called “ radio” RF24 radio(7, 8)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |