Changing CE/CS Pins used
-
Hi Hek,
In the earlier library versions we specified the pins for CE/CS when we specified the relay or sensor function( is it a function?)
ie: "Sensor gw(9,10);"Now you have moved these default values into the sensor.h file:
* @param _cepin The pin attached to RF24 Chip Enable on the RF module (defualt 9) * @param _cspin The pin attached to RF24 Chip Select (default 10) */ Sensor(uint8_t _cepin=9, uint8_t _cspin=10);
My question is, can i override these pin values by continuing to call the function with the values i require?
ie: Sensor gw(8,9);or....do i need to change sensor.h /relay.h as i need?
( same applies with the interupt pin...i need to use pin D3.)
Greg
-
Yes, that's exactly how you would do it - the defaults only apply if the function is called without parameters.
-
And D3 is actually not used at the moment. So you can safely detach the cable between IRQ from radio to D3 without losing any functionality (as of today).
-
Fantastic.. Thanks for this.
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
hlk-pm01 are to noisy for rfm69?
Hardware • 5 Aug 2023, 21:16 • Tmaster 9 Aug 2023, 16:28 -
Sleep mode for bmp280
Hardware • 20 Feb 2018, 13:24 • fishermans 5 Feb 2024, 18:30 -
Sensors and more
Hardware • 19 Jun 2023, 00:41 • Robert Leverett 19 Jun 2023, 00:41 -
Does MySensors require Arduino Timer 2?
Hardware • 6 Jan 2024, 19:39 • OldSurferDude 11 Jan 2024, 04:39 -
Newbie questions
Hardware • 14 Feb 2025, 20:03 • magwas 14 Feb 2025, 20:03