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.
-
Fantastic.. Thanks for this.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login