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.6k 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
      • H Offline
        H 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

          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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          5

          Online

          12.0k

          Users

          11.2k

          Topics

          113.4k

          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