| | |
| | | \end{figure} |
| | | |
| | | |
| | | The connector has pinout shown in the data table. According to the \cite{productFamilyDatasheet}, pins 5 and 9 shoud be used for synchronization. From the pinout, pin number 8 could be used to power up electronics. However, no data about electrical characteristics of power supply is given (max current?). |
| | | The connector has pinout shown in the data table. According to the \cite{productFamilyDatasheet}, pins 5 and 9 shoud be used for synchronization. From the pinout, pin number 8 could be used to power up electronics. However, no data about electrical characteristics of power supply is given (max current?). \textbf{The cables in use, have a red wire at pin 1.} |
| | | |
| | | |
| | | |
| | |
| | | radio.write( &dataToSend, sizeof(dataToSend) ); |
| | | \end{verbatim} |
| | | |
| | | \subsection{Debug receiver} |
| | | |
| | | To measure trigger delay and for other debugging purposes, A simple debug receiver can be programmed. On this receiver, the nRF21l01 must be connected the same way as on trasmitter. The following code works as debug interface. The code can also be a reference for receiver design. |
| | | |
| | | \begin{verbatim} |
| | | #include <RF24_config.h> |
| | | #include <nRF24L01.h> |
| | | #include <RF24.h> |
| | | #include <printf.h> |
| | | |
| | | RF24 radio(22, 21); // CE, CSN |
| | | const byte address[6] = {'R','E','C','V', '1'}; |
| | | char val[4]; |
| | | |
| | | void setup() { |
| | | Serial.begin(115200); |
| | | radio.begin(); |
| | | radio.openReadingPipe(0, address); |
| | | radio.setPALevel(RF24_PA_MIN); |
| | | radio.startListening(); |
| | | |
| | | } |
| | | |
| | | void loop() { |
| | | delay(5); |
| | | radio.startListening(); |
| | | if ( radio.available()) { |
| | | while (radio.available()) { |
| | | |
| | | radio.read(&val, sizeof(val)); |
| | | Serial.print("Received = "); |
| | | Serial.println(val); |
| | | } |
| | | } |
| | | |
| | | } |
| | | \end{verbatim} |
| | | \end{document} |
| | | |