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.
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
Suggested Topics
-
Code for beta-testing?
Controllers • 24 Mar 2014, 20:48 • andriej 9 Aug 2014, 10:44 -
some differences between serial- and tcp-gateways.
Bug Reports • 15 Mar 2023, 09:26 • Branther 30 Mar 2023, 15:40 -
Making WiFiManager compatible with MySensors 2.3.2
Bug Reports • 12 Feb 2020, 21:43 • pihome 1 Jun 2022, 16:02 -
ACK -aka ECHO beeing missed by Serial Gateway with RF24 radios. V2.3.2
Bug Reports • 15 Apr 2023, 06:27 • GaryStofer 21 Apr 2023, 17:34 -
ESP32 + Signing fails after xxx msg as result of memory leak
Bug Reports • 6 Apr 2020, 18:43 • Technovation 7 Mar 2022, 10:37 -
Boards esp8266 v3.1.0 or Newer Doesn't Work with MySensors
Bug Reports • 21 Feb 2023, 01:55 • d-smes 25 Feb 2023, 19:37