From d6fc89518a6a3a21d53823d83d2a8cf64957d678 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Mon, 28 Mar 2022 19:52:23 +0000
Subject: [PATCH] Added test interrupt code.

---
 documentation/project_progress.tex |   38 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/documentation/project_progress.tex b/documentation/project_progress.tex
index 0338f55..15e43a9 100644
--- a/documentation/project_progress.tex
+++ b/documentation/project_progress.tex
@@ -60,7 +60,7 @@
 \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.}
  
 
 
@@ -212,6 +212,42 @@
 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}
 

--
Gitblit v1.9.3