Skip to content

Instantly share code, notes, and snippets.

@giljr
Created June 3, 2017 23:51
Show Gist options
  • Save giljr/a9786a51b3c09c3d5903de21a30913d8 to your computer and use it in GitHub Desktop.
Save giljr/a9786a51b3c09c3d5903de21a30913d8 to your computer and use it in GitHub Desktop.
nRF24L0 Page https://goo.gl/H8i0rT
+------------------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------+
| Transmit | Receive | Informations |
+------------------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------+
| radio.begin(); | radio.begin(); | It activates the modem. |
| radio.setRetries(15, 15); | | It is a multiple of 250 microseconds. 15 * 250 = 3750. |
| So, if the recipient does not receive data, modem will try to send them every 3.75 milliseconds |
| radio.openWritingPipe(rxAddr); | radio.openReadingPipe(0, rxAddr); | sets the address of the receiver to which the program will send/receive data |
| radio.stopListening(); | radio.startListening(); | It switch the modem to data transmission mode/ to enable receiving mode |
| - | radio.available() | Waiting for the message to be ready to |
| radio.write(&text, sizeof(text)); | radio.read(&text, sizeof(text)); | Transmits and receives the message |
+------------------------------------+----------------------------------------+---------------------------------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment