RF24 icon indicating copy to clipboard operation
RF24 copied to clipboard

digitalWrite(LED_BUILTIN, HIGH); Not working after radio.begin();

Open alkuentrus opened this issue 7 years ago • 4 comments

Hi, I a using an Arduino Nano and IDE 1.8.10. The code attached works fine for another aspects, not for Digital Out for Led pin. If I comment the code radio.begin(); It works fine.... Can you help me? ` #include <RF24.h> #include <SPI.h> #include <RF24Audio.h> #include "printf.h"

RF24 radio(7,8); // Set radio up using pins 7 (CE) 8 (CS) RF24Audio rfAudio(radio,0); // Set up the audio using the radio, and set to radio number 0

void setup() { Serial.begin(115200); printf_begin(); //radio.begin(); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); }

void loop() {

}`

alkuentrus avatar Nov 01 '19 01:11 alkuentrus

SPI uses pin 13, so you can’t really use the built in LED while using SPI.

On Oct 31, 2019, at 19:55, alkuentrus [email protected] wrote:

 Hi, I a using an Arduino Nano and IDE 1.8.10. The code attached works fine for another aspects, not for Digital Out for Led pin. If I comment the code radio.begin(); It works fine.... Can you help me? ` #include <RF24.h> #include <SPI.h> #include <RF24Audio.h> #include "printf.h"

RF24 radio(7,8); // Set radio up using pins 7 (CE) 8 (CS) RF24Audio rfAudio(radio,0); // Set up the audio using the radio, and set to radio number 0

void setup() { Serial.begin(115200); printf_begin(); //radio.begin(); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); }

void loop() {

}`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

TMRh20 avatar Nov 02 '19 15:11 TMRh20

Oh my, oh my!!! Did'n remember that!!! Sorry :(

alkuentrus avatar Nov 02 '19 19:11 alkuentrus

@alkuentrus

You should close this issue now that you know what's up so that when other people search for the same issue, they know it's resolved. :+1:

olback avatar Nov 08 '19 22:11 olback

@olback , You are right! Id didn't realize I had to :) Going to do so, thks!

alkuentrus avatar Nov 08 '19 22:11 alkuentrus