Mysensors on Mega ?
-
Some times ago, there was a constructor for the Mega that could change the pin allocation to use it:
MySensor gw(48,49);
But it doesn't seems possible anymore, and the only other wway around found is this one:
MyConfig.h
- Ligne 112 : #define RF24_CE_PIN 48 //9 UNO
- Ligne 113 : #define RF24_CS_PIN 49 //10 UNO
- Ligne 127 : const uint8_t SOFT_SPI_MISO_PIN = 50; //16 UNO
- Ligne 128 : const uint8_t SOFT_SPI_MOSI_PIN = 51; //15 UNO
- Ligne 129 : const uint8_t SOFT_SPI_SCK_PIN = 52; // 14 UNO
@hek is that correct ? if not, would it be possible that information be available in the "wiring" section ?
thanks,
-
In the 2.0.0-beta development branch you just define the following in sketch:
#define MY_RF24_CE_PIN xx #define MY_RF24_CS_PIN yy
In 1.6 you have to create a Transport class with the pin definitions
https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MyTransportNRF24.hYou can see an example of this here:
https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/examples/SerialGateway/SerialGateway.ino#L62