Changing CE/CS Pins used


  • Hero Member

    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


  • Code Contributor

    Yes, that's exactly how you would do it - the defaults only apply if the function is called without parameters.


  • Admin

    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).


  • Hero Member

    Fantastic.. Thanks for this.


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.