B4R Question nodeMCU and rRCSwitch library

Discussion in 'B4R Questions' started by giggetto71, Apr 7, 2019.

  1. giggetto71

    giggetto71 Member Licensed User

    Hi,
    does any one have any experience of the rRCSwith library with NodeMCU? I have installed the lib without problems and compiled the RCSwitch-receive module from the example but cannot get the Sub rcs_Available fired. maybe I am connecting the wrong pin? Which one should I use on the NodeMCU and how should I configure it the enable receiver. I have tried:

    rcs.enableReceive("rcs_Available",pp.D6)

    but it does not work.
    any idea?
    thanks
     
  2. giggetto71

    giggetto71 Member Licensed User

    I forgot to paste the code...sorry
    Code:
    #Region Project Attributes
        
    #AutoFlushLogs: True
        
    #CheckArrayBounds: True
        
    #StackBufferSize: 300
    #End Region

    Sub Process_Globals
        
    Public Serial1 As Serial
        
    Public rcs As RCSwitch
        
    Public pp As D1Pins
    End Sub

    Private Sub AppStart
        Serial1.Initialize(
    115200)
        Delay(
    1000)
        
    Log("AppStart")
        rcs.Initialize
        rcs.enableReceive(
    "rcs_Available",pp.D6)
    End Sub

    private Sub rcs_Available()
        
    Log("Code: ", rcs.ReceivedCode)
        
    Log("Protocol: ", rcs.ReceivedProtocol)
        
    Log("Bit length: ", rcs.ReceivedBitLength)
        
    Log("Delay: ", rcs.ReceivedDelay)
        
    Log(" ")
        rcs.ResetAvailable
    End Sub
     
  3. thetahsk

    thetahsk Active Member Licensed User

    and check the arduino example if they are working.
    https://github.com/sui77/rc-switch
     
  4. giggetto71

    giggetto71 Member Licensed User

    thanks...had no luck..
    I have set
    Code:
    rcs.enableReceive("rcs_Available",rcs.WEMOS_Receivepin_3)
    and connected the receiver data pin to pin D3 but still nothing...
    any clue?
     
  5. giggetto71

    giggetto71 Member Licensed User

    it works now..at least it can read the transmitter driven by the same nodemcu. I would say it's ok now. probably I was just guessing there were some othere devices transmitting using 433 Mhz but maybe I was wrong..thanks
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice