0

I'm trying to hook up a nRF24L01+ wireless transmitter to an Arduino Yun Mini on SPI, but I'm having a hard time. After a few minutes Linino crashes and becomes completetly inaccessible - until I upload a new sketch to the Arduino.

I connected the SPI pins (MOSI, MISO and SCK) to the corrensponding pins of the Yun. I connected CE to pin 3 and CSN to pin 2. I'm using the RF24 library found here: https://github.com/TMRh20/RF24

The following little code is enough to make Linino crash:

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

RF24 radio(3,2);

void setup() {
  radio.begin();
}

void loop() {

}

What am I doing wrong here? Any ideas? Any help is greatly appreciated!

  • Sounds like lack of power to me. What are you powering the board with? – Majenko Feb 5 '16 at 17:12
  • ~14mA, I doubt it. Does Linino work with the default, empty sketch? – Avamander Feb 5 '16 at 19:50
  • I power the board with an external power supply, two voltages common ground. 5V/1.5A attached to Vin. There is one component on the pcb (h-bridge) hocked up to 12V supply, common ground. There's a 3V3 voltage regulator (no logic level converter) between the 5V rail and the Vcc of the nRF24L01. And yes, Linino is doing fine with an empty sketch. – DinuTheHuman Feb 6 '16 at 14:41
  • Random thought I had: Since I use an Arduino Yun mini I only have wifi to access linino. Could it be possible that the nRF24L01 is jamming wifi that much that it is unable to connect to the router? I guess that sounds strange but would explain the strange behaviour. – DinuTheHuman Feb 6 '16 at 15:55
  • I tested the hypothesis of radio interference and I could be on to something. I did this before by changing the distance to the router, which didn't seem to do the trick. Now I got an external wifi antenna and it seems to work more stable now. I'll do a long-term test and post the results here. – DinuTheHuman Feb 6 '16 at 19:37
0

I finally managed to get it running. It really seems to be a problem with radio interference. I failed to hook up an external WLAN antenna to the Arduino Yun mini but I found a very useful workaround with a usb adapter here: http://www.lucadentella.it/en/2014/11/08/yun-adattatore-wifi-usb/

This workaround is possible with an Arduino Yun mini as well but you'll need the Arduino Yun Linux OS from here: https://www.arduino.cc/en/Main/Software

because the necessary packages are not available for the Linino system that comes with the Yun mini. Then, you can connect the WiFi adapter to USB+, USB-, 5V and GND of the Yun mini and you're good to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.