RF24
RF24 copied to clipboard
Bizarre behavior with Arduino UNO
I'm unable to make basic diagnostics work via the radio.printDetails command with an Arduino UNO. When the code reaches this command, nothing is printed, and it makes the code reset and it just fails in a loop. The below code will print 1,2,1,2,1,2... No output I can blame on a bad connection, but the UNO is resetting in a loop.
I checked the connection a million times with no luck. While running diagnostics, I found the code still runs this way even with the NRF24L01 not connected. Again, I don't get how this can cause a reset.
Oh yeah...code:
#include <RF24.h>
RF24 radio(10, 9); // CE, CSN
void setup() {
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
Serial.begin(115200);
Serial.println('1');
delay(1000);
radio.begin();
delay(1000);
Serial.println('2');
delay(1000);
radio.printDetails();
delay(1000);
Serial.println('3');
delay(1000);
Serial.println('4');
}
void loop() {
}