The blog of 'The Arduino Guy' aka Mike McRoberts, author of Beginning Arduino.

05 October 2014

Arduino Yun and the RFM69CW

Sunday, October 05, 2014 By

I've been playing around with  RFM69CW radio tx/rx modules lately for an environmental sensor node monitoring project. Using the Jeelibs RFM12 library I was trying to get the Arduino Yun to talk to and configure the device over SPI to no avail. No amount of messing around solved the problem. I finally tried swapping out the Yun for an Uno and voila! It worked!

After doing a little bit of research it turns out that the Yun does not have its SPI pins broken out to the digital I/O pins as they are on the Uno and instead are only connected to the ICSP connector. So no wonder it wasn't working. After hooking up two modules to two Uno's they were able to communicate to each other successfully.

I have no idea why the ISP pins are not broken out on the Yun like they are on the previous Arduinos but i'm sure there is a valid reason for it.

So, now I have two device communicating the next stage in this project is to hook up some sensors to one of the device and have it sending the data back to the base station device. After that, the circuit will be powered by battery and using sleep modes will sleep in-between sending data to conserve energy.

1 comments:

  1. Hi
    I you read the Arduino Yun datasheet you will find the information regarding SPI:
    "Note that the SPI pins are not connected to any of the digital I/O pins as they are on the Uno, They are only available on the ICSP connector. This means that if you have a shield that uses SPI, but does NOT have a 6-pin ICSP connector that connects to the Yún's 6-pin ICSP header, the shield will not work. "
    The JeeLib will work with Arduino Yun but you need to switch the IRQ signal from D2 to D3 (D2 is on Uno, D3 on Yun or Leonardo

    Thomas
    555CircuitsLab

    ReplyDelete