×

Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.

Member #1146010

Member Since: September 21, 2017

Country: United States

  • To get this working with a Yun First Generation (and probably some of it applies to other ATmega32U4 based boards):

    1) Connect SPI lines MISO, MOSI and CLK from the ICSP header to RFM69BOB pins O,I and C respectively. (Do not use pins 11-13 as the tutorial for the Uno)

    2) For Slave Select use Yun Digital Pin 10 (i.e. connect RFM69BOB pin S to Yun pin D10)

    3) For the Rx Interrupt use Pin 3, not Pin 2 as in the Tutorial (look at RFM69.h ifdef for AVR_ATmega32U4 to understand why)

    In your code set the slave select pin like so:

    // Initialize the RFM69HCW:
    radio.setCS(10);
    radio.initialize(FREQUENCY, MYNODEID, NETWORKID);
    radio.setHighPower(); // Always use this for RFM69HCW
    

    That's it!

    Note that the Yun/ATMega combo seems to be a bit slow on sending the ACK so for your other radios you should use a bit more time and retries if you want ACK to work. I am currently using (on all other radios except the Yun):

    radio.sendWithRetry(TONODEID, sendbuffer, sendlength, 5, 100)
    

    Hope this helps other Yun Generation 1 users that want to mess with RFM69 and use the Yun as the IoT gateway.

No public wish lists :(