I've done a search but found nothing really relevent but I'm sure I've not been looking hard enough.
So far I've managed to get my pair of 433Mhz radio modules to work properly. I started with.
TX
I plan to use the link to send different types of data down it in this case about 8 channels of hi/lo inputs and two analogue channels to ultimately drive a pair of servos.
This is my tx code so far which is tested and working.
I would also like to send the analogue information down the link too I've tried a few thing but without success. I read somewhere about using something like
So far I've managed to get my pair of 433Mhz radio modules to work properly. I started with.
TX
RXdo
serout 2, N2400_4, ("UUU") ' preamble
pause 5 ' wait to allow rx to settle
serout 2, N2400_4, ("abc", b0) ' send the data
loop
This proved that my link worked and I was able to get about 100M range using a 1/4 wave whip aerial. I did get some funny looks carrying a breadboard about and managed about 100M before the data started dropping out.do
serin 1, N2400_4, ("abc", b0) ' receive string
high 2 'on led
pause 500
low 2
loop
I plan to use the link to send different types of data down it in this case about 8 channels of hi/lo inputs and two analogue channels to ultimately drive a pair of servos.
This is my tx code so far which is tested and working.
RXdo
if pin0 = 1 then gosub ch1
if pin1 = 1 then gosub ch2
loop
ch1:
serout 2, N2400_4, ("UUU") 'preamble
pause 5 'pause
serout 2, N2400_4, (11, b0) 'data
return
ch2:
serout 2, N2400_4, ("UUU") 'preamble
pause 5 'pause
serout 2, N2400_4, (22, b0) 'data
return
This works but I would prefer to have the outputs remain high all the time the input channel remain high however due to the pauses the outputs pulse how would I achieve this?do
gosub clear 'clear o/p
serin 2, N2400_4, ("UUU"), b1 'wait for data
select case b1
case 11
gosub ch1
case 22
gosub ch2
end select
loop
ch1:
toggle 1
pause 250
return
ch2:
toggle 2
pause 250
return
clear:
low 1
low 2
I would also like to send the analogue information down the link too I've tried a few thing but without success. I read somewhere about using something like
I had a go but without success any ideas?serout 2, N2400_4, (b1, b2, b3, b4 etc)