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
1 out of 2
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
Home Assistant/MySensors quirks
Development • 17 Mar 2025, 02:35 • OldSurferDude 17 Mar 2025, 02:35 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 12 Mar 2025, 23:39 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26