Samo Penic
2022-03-28 9843c52ec4fff920496dd04e47f8f823eff4c4ef
Added debug receiver code and added pull ups to transmitter. Everything seems to be working
1 files added
1 files modified
38 ■■■■■ changed files
firmware/debug_receiver/receiver/receiver.ino 35 ●●●●● patch | view | raw | blame | history
firmware/trigger_firmware/trigger_firmware.ino 3 ●●●● patch | view | raw | blame | history
firmware/debug_receiver/receiver/receiver.ino
New file
@@ -0,0 +1,35 @@
#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() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
}
void loop() {
  // put your main code here, to run repeatedly:
  delay(5);
  radio.startListening();
  if ( radio.available()) {
    while (radio.available()) {
      radio.read(&val, sizeof(val));
      Serial.print("Received = ");
      Serial.println(val);
    }
  }
}
firmware/trigger_firmware/trigger_firmware.ino
@@ -49,5 +49,6 @@
void loop() {
  // put your main code here, to run repeatedly:
//radio.write( &dataToSend, sizeof(dataToSend) );
//    delay(5000);
}