Pages: [1]   Go Down
Author Topic: Yun and Serial Monitor problem  (Read 655 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello guys and sorry for my english... it's not my native language.
I'm trying to connect my arduino yun with the old Arduino 2009 using two NRFL2401+ modules .
After some tries with the mirf library I started debuging my code using the Serial.println() instruction and i noticed some problems. Messages are partially printed on the serial monitor and the TX Led is always on... This is the simple sketch that is running on Yun.

Code:
#include <SPI.h>
#include <Mirf.h>


void setup()
{
  Serial.begin(57600);
  delay (5000);
  Serial.println("Seriale inizializzata");
   delay (1000);
 Mirf.csnPin = 7;
 delay (1000);
 Serial.println("Csn Pin dichiarato...");
 delay (2000);
 Mirf.cePin = 4;
 delay (2000);
 Serial.println("Ce Pin dichiarato...");
 Mirf.init();
 delay (2000);
Serial.println("Mirf Init completo...");
}

void loop() {
  // put your main code here, to run repeatedly:

}


And this is the output i see on my serial monitor
Code:
Seriale inizializzata
Csn Pin dichiarato...
Ce

Sometimes I can't even see the last line ("Ce" i mean). I'm using the Nightly version of the Arduino IDE because the stable one gave me problem during compiling of mirf library ( "uint8_t does not name a type " ).

These are the connection i did on my Yun
Code:
NRF24L01+    Yun
GND    GND
Vcc    3v3
CE     4D
CSN    7D
SCK    ICSP-pin3
MOSI   ICSP-pin4
IRQ    //

Still sorry for my english and
Thank you all  smiley-cool
Logged

Los Angeles
Offline Offline
Full Member
***
Karma: 6
Posts: 211
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your English is not a problem here, but the fact that you are seem to be using serial0 on the Yun, which won't work as this serial connection is used by the bridge between the ATmega part and the Linino part. Try using serial1 instead on the Yun...

Ralf
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But the sketch is not using the Bridge in any way. So why should using serial become a problem?
What's this Mirf class/lib doing?
Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1762
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

...
What's this Mirf class/lib doing?

http://playground.arduino.cc/InterfacingWithHardware/Nrf24L01


Code:
Seriale inizializzata
Csn Pin dichiarato...
Ce

mean fail to initialize.


Code:
NRF24L01+    Yun
GND    GND
Vcc    3v3
CE     4D
CSN    7D
SCK    ICSP-pin3
MOSI   ICSP-pin4
IRQ    //

Where is the MISO?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys
Where is the MISO?
Ops... I forgot to write it.... Anyway it's connected on ICSP pin 1. So you think it's a problem of initialization... Hmmm so why the TX led stuck on ON? And why does it print half line??
Your English is not a problem here, but the fact that you are seem to be using serial0 on the Yun, which won't work as this serial connection is used by the bridge between the ATmega part and the Linino part. Try using serial1 instead on the Yun...

Ralf

Hi Ralf. I don't think the problem is this because i can "partially" use the Serial command and i'm not interacting with linino.. Let's say i'm using it as a Leonardo
Logged

Los Angeles
Offline Offline
Full Member
***
Karma: 6
Posts: 211
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, have you tried it on a Leonardo?

This page with some info about the MIRF library explicitly mentioned differences in the boards... smiley-confuse

Ralf
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I did not explain myself well.  I don't own an arduino Leonardo so i can't try.
I just wanted to say that i m using my yun as a Leonardo intending that , just because i'm not using the linino side,i think i can consider the yun as a Leonardo and follow the connection guide you posted as i did

These are the connection i did on my Yun
Code:
NRF24L01+    Yun
GND    GND
Vcc    3v3
CE     4D
CSN    7D
SCK    ICSP-pin3
MOSI   ICSP-pin4
IRQ    //

MISO Icsp-pin1
Logged

Pages: [1]   Go Up
Jump to: