simple wireless remote sensor

sbscott

Senior Member
I had a leaking water pipe in the crawl space that needed repair. Before I could get a plummer out, I needed to monitor the leak. It would have to be wireless because of the distance, complexity to run a wired senor to the spot.

I discovered some time ago a niffy, cheap wireless transmitter/receiver that I have used on several projects. This rf device is small and has a range of at least 50 feet, through walls. It comes with two dongles. One is connected to a PIXACE 08M with small isolation relays to simulate the button push (push one button to turn on, a different button to turn off) when the 08M senses a lower resistance. The senor is measured on an ADC input pin of the 08.

The Tr/RX module is the RM01 from Logisys. You can buy it from Geeks for about $12. http://www.geeks.com/details.asp?invtid=RM01&cat=GDT

The code is straightforward:
'08 14 bit0-15 b0-13 w0-6
' remote water sensor

st:
readadc 4,b1:pause 100 ' read sensor
if b2=1 then goto jmp
if b1>10 then gosub ton
jmp:
if b2=1 and b1=0 then gosub toff
goto st

ton: ' turn on
b2=1
high 1:pause 300:low 1
return

toff: ' turn off
b2=0:high 2:pause 300:low 2
return
I have also used this setup for a wireless alarm sensor. Very useful!
 

MPep

Senior Member
Did you put that smiley in your code on purpose? Makes it difficult to read.

Interesting RF gadget.
 

westaust55

Moderator
The [code] tag also switches to a fixed width (monospace) font and preserves all spacing. As such indentation, general white space and tabulation are generally maintained for forum readability.

FOR b0 = 0 to 7 ; this is the outer loop
FOR b1 = 0 to 7 ; this is an inner nested loop
b2 = b0 * 8 + b1 ; a calculated index or pointer
NEXT b1 ; completion of the inner loop
NEXT b0 ; completion of the outer loop

FOR b0 = 0 to 7 ; this is the outer loop
FOR b1 = 0 to 7 ; this is an inner nested loop
b2 = b0 * 8 + b1 ; a calculated index or pointer
NEXT b1 ; completion of the inner loop
NEXT b0 ; completion of the outer loop
with spaces to comments
Code:
FOR b0 = 0 to 7                 	; this is the outer loop
  FOR b1 = 0 to 7              	; this is an inner nested loop
    b2 = b0 * 8 + b1            ; a calculated index or pointer
  NEXT b1              	; completion of the inner loop
NEXT b0                           ; completion of the outer loop
with tabs to comments
Code:
FOR b0 = 0 to 7		; this si the outer loop
  FOR b1 = 0 to 7		; this is an inner nested loop
    b2 = b0 * 8 + b1	; a calculated index or pointer
  NEXT b1		; completion of the inner loop
NEXT b0			; completion of the outer loop
 
Last edited:
Top