I don't have any problem uploading other sketches to this board. But when I try to upload the example sketch for the RF24 library called "Getting Started", I get the following errors.
What am I missing?
Thanks!
Arduino: 1.8.9 (Mac OS X), Board: "Arduino Nano, ATmega328P"
Sketch uses 4480 bytes (14%) of program storage space. Maximum is 30720 bytes.
Global variables use 226 bytes (11%) of dynamic memory, leaving 1822 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x52
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x46
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x32
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x34
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x2f
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x65
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x61
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6d
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x70
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
That error has nothing to do with the library. The code is compilng without errors. The issue is in the serial communication for upload. Is the right serial port selected in Tools? Check the USB cable?
Yeah, I'm using the correct port. I can upload other sketches just fine with the same exact setup.
I don't think it should matter if I have anything plugged into the Arduino when uploading. Either way, I have the NRF24L01+ transceiver wired up as indicated by the library creator.
It's not an issue of the sketch not working after uploading. It's an issue of the sketch not uploading at all.
Is it possible that the transceiver pulls too much current, and when an upload is initiated, the Arduino throws an error because the current is too much?
gabrielredding:
Is it possible that the transceiver pulls too much current, and when an upload is initiated, the Arduino throws an error because the current is too much?
Without seeing your wiring diagram it is difficult to know what you are doing. I don't think a nano can provide enough 3.3v current for an nRF24, but I have no idea whether that would interfere with uploading.
However there is a very simple test. Try uploading the code with the nRF24 disconnected.
I have never had any trouble uploading code to my Arduinos with an nRF24 attached - however I don't have a nano.