Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Bug Reports
  3. The MySensor 1.5 code is not compiling for my Arduino Mega 2560 board

The MySensor 1.5 code is not compiling for my Arduino Mega 2560 board

Scheduled Pinned Locked Moved Bug Reports
1 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • BartEB Offline
    BartEB Offline
    BartE
    Contest Winner
    wrote on last edited by
    #1

    The MySensor 1.5 code is not compiling for my Arduino Mega 2560 board.
    It misses the RF69_IRQ_NUM define in several files.

    In file included from C:\Program Files (x86)\Arduino\libraries\MySensors\MyTransportRFM69.h:26:0,
    from C:\Program Files (x86)\Arduino\libraries\MySensors\MyTransportRFM69.cpp:21:
    C:\Program Files (x86)\Arduino\libraries\MySensors\utility/RFM69.h:78:62: error: 'RF69_IRQ_PIN' was not declared in this scope
    RFM69(byte slaveSelectPin=RF69_SPI_CS, byte interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, byte interruptNum=RF69_IRQ_NUM) {

    I was able to track the issue down to the RFM69.h file. Line 39 untill 47

    // INT0 on AVRs should be connected to RFM69's DIO0 (ex on Atmega328 it's D2, on Atmega644/1284 it's D2)
    #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__) || defined(__AVR_ATmega32U4__)
      #define RF69_IRQ_PIN          2
      #define RF69_IRQ_NUM          0
    #elif  defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
      #define RF69_IRQ_PIN          2
      #define RF69_IRQ_NUM          2
    #endif
    
    

    The Ardiuno Mega 2560 seams to not match both if's so no define is declared.

    by replacing this line

    #elif  defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
    

    by this line

    #else
    

    Will make the code compile, but does not look like the best solution

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    10

    Online

    11.7k

    Users

    11.2k

    Topics

    113.0k

    Posts


    Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • MySensors
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular