(english version below)
Este post é basicamente para ajudar as pessoas que estão tentando usar o modulo wireless NRF24L01 com o Arduino Leonardo.
Adquiri meu modulo na DealExtreme por US$ 4,50
Se você procurar na internet vai achar um bocado de informações sobre o funcionamento deste com o Arduino, mas se tentar ligar no Leonardo não terá sucesso.
Eu encontrei uma solução usando os pinos do ICSP para ligar o modulo. Abaixo adicionei uma imagem desta ligação (desculpe a qualidade, não existe uma parte no Fritzing para identificar este módulo).
Explicando a imagem:
NRF24L01 | Color | Leonardo |
GND | Preto | GND |
3.3V | Vermelho | 3.3V |
CE | Rosa | 9 |
CSN | Azul Claro | 10 |
SCK | Verde | ICSP – SCK |
MOSI | Amarelo | ICSP – MOSI |
MISO | Azul | ICSP – MISO |
IRQ | – | Não usada |
A imagem indicada por ISP6PIN acima é o detalhamento dos pinos do ICSP para o Arduino Leonardo.
Tentarei encontrar a forma de ligar o modulo usando os pinos digitais D0-D13, mas por enquanto está funcionando.
Voce pode obter maiores informações sobre o NRF24L01 aqui.
Voce pode usar o código fonte do exemploda biblioteca RF24 “GettingStarted” (download aqui).
Lembre-se de adicionar a checagem da disponibilidade da serial logo após “Serial.begin(57600)”, caso voce queira debugar utilizando o monitor serial, deste jeito:
Serial.begin(57600); while (!Serial) { ; // aguarde a serial conectar. Somente necessário para o Leonardo }
ENGLISH
This post is just to help people that are trying to use the NRF24L01 2.4GHz Wireless Transceiver Module with Arduino Leonardo.
My module come from DealExtreme and costs US$ 4,50.
If you search the internet you will find a lot of information about using it with Arduino, but if you try to use it with Leonardo you will fail.
I have found a solution using the ICSP pins to plug the NRF24L01. Below is the image (sorry, I cant draw it with Fritzing as there is no Fritzing part for the module).
Explaining it:
NRF24L01 | Color | Leonardo |
GND | Black | GND |
3.3V | Red | 3.3V |
CE | Pink | 9 |
CSN | Light Blue | 10 |
SCK | Green | ICSP – SCK |
MOSI | Yellow | ICSP – MOSI |
MISO | Blue | ICSP – MISO |
IRQ | – | Not used |
The ISP6PIN in the image is the ICSP detail for Arduino Leonardo.
I will try to find a way to use the D0-D13 pins but for now it is working.
You can obtain more information about the NRF24L01 from here.
You can use the “GettingStarted” sketch from RF24 library (download here).
Just remember to add Serial checking below “Serial.begin(57600)”, if you want to use Serial Monitor, like this:
Serial.begin(57600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only }
Reblogged this on Gigable – Tech Blog.
Great article. You helped me to communicate between two arduinos (UNO and Leonardo).
0.1UF capicitive attach gnd from 3.3VCC works fun!without Serial check