I have a thread on another forum, but so far I haven't been able to get two PIC PCBs with HC-12 radio modules to RECEIVE and switch a LED ON/OFF.
I have two PCBs each with an HC-12, also a serial input to a computer READing from a 3rd HC-12 onto a Terminal.
Both PCBs TX and are RXed on the screen ok.
I've tried to send '0' and '1' as a switch from TX, and the RX shows some results, but not clean LED ON/OFF.
This is in Oshonsoft.
Here's the latest TX and RX CODE:
This gives RLED always ON, YLED sometimes ON/OFF
I tried many > and < numbers, and found =106 worked 50% of the time for some strange reason?
Any help please?
Camerart.
TX:--------------------------------------------------------------------------------------
For x = 0 To 1000
rled = 0
yled = 1
Hserout "0", CrLf : ALSO Hserout "1", stri, crlf: ALSO Hserout stri, crlf
Next x
For x = 0 To 1000
rled = 1
yled = 0
Hserout "1", CrLf
Next x
RX:--------------------------------------------------------------------------------
Hserget i
If i = 0 Then '< --- -- 48 is number 0
Hserout "Number: ", i, CrLf
rled = 1
WaitMs 500
Endif
If i = 106 Then '= 106 Then '< --- -- 49 is number 1
Hserout "Number: ", i, CrLf
yled = 1
WaitMs 500
Endif
I have two PCBs each with an HC-12, also a serial input to a computer READing from a 3rd HC-12 onto a Terminal.
Both PCBs TX and are RXed on the screen ok.
I've tried to send '0' and '1' as a switch from TX, and the RX shows some results, but not clean LED ON/OFF.
This is in Oshonsoft.
Here's the latest TX and RX CODE:
This gives RLED always ON, YLED sometimes ON/OFF
I tried many > and < numbers, and found =106 worked 50% of the time for some strange reason?
Any help please?
Camerart.
TX:--------------------------------------------------------------------------------------
For x = 0 To 1000
rled = 0
yled = 1
Hserout "0", CrLf : ALSO Hserout "1", stri, crlf: ALSO Hserout stri, crlf
Next x
For x = 0 To 1000
rled = 1
yled = 0
Hserout "1", CrLf
Next x
RX:--------------------------------------------------------------------------------
Hserget i
If i = 0 Then '< --- -- 48 is number 0
Hserout "Number: ", i, CrLf
rled = 1
WaitMs 500
Endif
If i = 106 Then '= 106 Then '< --- -- 49 is number 1
Hserout "Number: ", i, CrLf
yled = 1
WaitMs 500
Endif