Brettw3317
New Member
Hi . . .
working with the 08m im trying to create a circuit that has a infrared beam across a driveway and when that infrared is broken e.g. by a car it realises this and will send a signal wirelessly to another chip that will pick this signal up and sound an alarm
Inrared Trannsmitter
main:
infraout 1,1
pause 500
goto main
Infrared Reciever / wireless transmitter
main:
b13 = 0
low 2
low 1
low 4
infrain2
debug
if b13 = 1 then flash:
goto main
flash:
high 2
pause 500
low 2
low 1
b1 = 1
serout 0,n2400,(85,85,85,"growl",b1)
high 1
pause 222
goto main
Wireless Reciever
main:
b1 = 0
serin 3, n2400, ("growl"),b1
pause 222
if b1 = 0 then go
if b1 = 1 then blue
goto main
go:
high 4
pause 500
low 4
pause 500
'ILikeTo
tune 0, 3,($01,$3C,$01,$3C,$01,$3C,$01,$08,$06,$3C,$06,$04,$06,$03,$08,$01,$3C,$01,$3C,$01,$3C,$01,$08,$3C,$06,$04,$03,$06,$03,$08,$01)
goto main
blue:
high 1
pause 222
low 1
pause 222
goto main
The Problem is in the line if B1=0 then go because the reciever will stop at the serin 3, n2400, ("growl"),b1
and wait until it recieves the signasl before it will continue.
i have tried to fix the problem at the infra red reciever aswell by adding the code main:
b13 = 0
low 2
low 1
low 4
infrain2
debug
if b13 = 1 then flash
if b13 = 0 then light
goto main
flash:
high 2
pause 500
low 2
low 1
b1 = 1
serout 0,n2400,(85,85,85,"growl",b1)
high 1
pause 222
goto main
flash
high 2
b1 = 1
serout 0,n2400,(85,85,85,"scream",b1)
high 1
pause 222
But That doesnt work either as it will wait for the infrared to send an actual 0 . . . i would like some help with figuring out the code i could use to get this to work . . . any help appreciated
working with the 08m im trying to create a circuit that has a infrared beam across a driveway and when that infrared is broken e.g. by a car it realises this and will send a signal wirelessly to another chip that will pick this signal up and sound an alarm
Inrared Trannsmitter
main:
infraout 1,1
pause 500
goto main
Infrared Reciever / wireless transmitter
main:
b13 = 0
low 2
low 1
low 4
infrain2
debug
if b13 = 1 then flash:
goto main
flash:
high 2
pause 500
low 2
low 1
b1 = 1
serout 0,n2400,(85,85,85,"growl",b1)
high 1
pause 222
goto main
Wireless Reciever
main:
b1 = 0
serin 3, n2400, ("growl"),b1
pause 222
if b1 = 0 then go
if b1 = 1 then blue
goto main
go:
high 4
pause 500
low 4
pause 500
'ILikeTo
tune 0, 3,($01,$3C,$01,$3C,$01,$3C,$01,$08,$06,$3C,$06,$04,$06,$03,$08,$01,$3C,$01,$3C,$01,$3C,$01,$08,$3C,$06,$04,$03,$06,$03,$08,$01)
goto main
blue:
high 1
pause 222
low 1
pause 222
goto main
The Problem is in the line if B1=0 then go because the reciever will stop at the serin 3, n2400, ("growl"),b1
and wait until it recieves the signasl before it will continue.
i have tried to fix the problem at the infra red reciever aswell by adding the code main:
b13 = 0
low 2
low 1
low 4
infrain2
debug
if b13 = 1 then flash
if b13 = 0 then light
goto main
flash:
high 2
pause 500
low 2
low 1
b1 = 1
serout 0,n2400,(85,85,85,"growl",b1)
high 1
pause 222
goto main
flash
high 2
b1 = 1
serout 0,n2400,(85,85,85,"scream",b1)
high 1
pause 222
But That doesnt work either as it will wait for the infrared to send an actual 0 . . . i would like some help with figuring out the code i could use to get this to work . . . any help appreciated