Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Changing CE/CS Pins used

Changing CE/CS Pins used

Scheduled Pinned Locked Moved Hardware
4 Posts 3 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • greglG Offline
    greglG Offline
    gregl
    Hero Member
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ToSa
      Code Contributor
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • greglG Offline
          greglG Offline
          gregl
          Hero Member
          wrote on last edited by
          #4

          Fantastic.. Thanks for this.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          16

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular