blink stops with radio.begin()

I got a new “Nano”, installed IDE under Ubuntu and run “File” → “Examples” → “01.Basics” → “blink”
All is fine, led 13 blinks as it should.

As I want to use a RF24 antena, I install “<nRF24L01.h>” and include the lines

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 radio( 9, 8 ) ; // CE, CSN

All still fine, LED blinks at the rate I select

But when I insert “radio.begin()” in the "setup() section, the blink stops

void setup() {
  Serial.begin( 9600 );

Why ?

I want to use the LED to indicate “OK” or “Error” as the Arduino will have no connection to Ubuntu

My guess:

  • radio uses SPI to transfer data
  • SPI is connected on pins 11, 12 and 13 (SCK)
  • the builtin led is also on pin 13 (LED_BUILTIN)
    So you’ll have to use another led, connected to a free I/O pin.

... maybe pin 13 is used as "SCK" for the "radio" ?
Yes, Erik - that's what I think too - thanks.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.