B4R Question issue with rRCSwitch library in reception

candide

Active Member
Licensed User
sorry, i edit this thread because after more tests issue reported here is not where i was thinking is first

i wanted to do some tests around rRCSwitch library and after some work on hard, tests were possible. i use a RX470b for reception and a WL102-341 for transmission.
Transmission is connected at GPIO14 and reception is connected at GPIO0

Transmission is working without problem, but i was stuck on reception sometimes, it was not possible to receive something and i was thinking at an issue around reception sub, but this part is working well.

in fact, at start of tests, sometimes all receptions were blocked, and i saw reception was also blocked on all others receptors around. In fact, when we have transmitter and receptor connected to Wemos and when we are using only reception part we have to lock pin connected at transmitter to avoid oscillation.

after a lock pf pin GPIO14 to false reception was working well, until i wanted to use wemos connected on 5V by USB without PC: in this case, no reception, and this issue is still present.
reception is working well when B4R is open on my PC and when Wemos is connected for log.
as soon as i disconnect the log on my PC, i have no reception.

i did some modifications on example to add a led activation in case of reception of message wwhen log is disconnected and i can see led each time i have a 433 sequence when log of my PC is connected, and no led, no reception as soon as log is disconnected on my PC.
same when i connect wemos directly on 5v: no reception....
code to to this test is below
B4X:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region

Sub Process_Globals
    Public Serial1 As Serial
    Public rcs As RCSwitch
    Private pin433out As Pin    'pin for 433 emettor on pin GIO14
    Private pinLed As Pin
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Delay(1000)
    Log("AppStart")
    rcs.Initialize
    rcs.enableReceive("rcs_Available", rcs.WEMOS_Receivepin_3)
    pin433out.Initialize(14,pin433out.MODE_OUTPUT)
    pin433out.DigitalWrite(False)
    pinLed.Initialize(2,pinLed.MODE_OUTPUT)
    pinLed.DigitalWrite(True)
End Sub

private Sub rcs_Available()
    pinLed.DigitalWrite(False)
    CallSubPlus("Pinendled",100,1)
    Log("Code: ", rcs.ReceivedCode)
    Log("Protocol: ", rcs.ReceivedProtocol)
    Log("Bit length: ", rcs.ReceivedBitLength)
    Log("Delay: ", rcs.ReceivedDelay)
    Log(" ")
    rcs.ResetAvailable
End Sub

Sub Pinendled(tag As Byte)
    pinLed.DigitalWrite(True)
End Sub

i would like to konw if it is an issue only due to my configuration or if it is generic. I saw messages of people testing also RCswitch, possible they can check...

thanks for your help
 
Last edited:

candide

Active Member
Licensed User
after a change of pin, RCSwitch is working well connected or not to PC when i use GPIO14 for reception.

GPIO0 should have a restriction somewhere.... but with GPIO14 it it working!
 
Upvote 0
Top