I am making a personal safety bracelet and want it to be able to send out a signal via a radio transmitter when it is activated. I also want to set up the reciever module which will show that the signal has been sent and received.
I have been trying to use 2 x 08m chips to work this.
The code I have been using for the transmitter unit (transmitter chip) is -
main:
if pin3=0 then alarm
if pin2=0 then batterylight
goto main
batterylight:
high 4
pause 1000
low 4
goto main
alarm:
let b2 = 22
let b3 = 36
let b4 = 48
serout,T2400, (b2)
serout,T2400, (b3)
serout,T2400, (b4)
pause 1000
goto main
The code I have been using for the receiver unit (receiver chip) is -
main:
input 1
serin 1,T2400, b2
if b2<> 22 then goto main
serin 1,T2400, b3
if b3<> 22 then goto main
serin 1,T2400, b4
if b4<> 22 then goto main
high 2
pause 1500
low 2
goto main
But when I link them up on two experiment boards and try and get them to work together and communicate it doesn't work.
I was wondering if anyone would be able to help please as this is for my a level project?!?
I have been trying to use 2 x 08m chips to work this.
The code I have been using for the transmitter unit (transmitter chip) is -
main:
if pin3=0 then alarm
if pin2=0 then batterylight
goto main
batterylight:
high 4
pause 1000
low 4
goto main
alarm:
let b2 = 22
let b3 = 36
let b4 = 48
serout,T2400, (b2)
serout,T2400, (b3)
serout,T2400, (b4)
pause 1000
goto main
The code I have been using for the receiver unit (receiver chip) is -
main:
input 1
serin 1,T2400, b2
if b2<> 22 then goto main
serin 1,T2400, b3
if b3<> 22 then goto main
serin 1,T2400, b4
if b4<> 22 then goto main
high 2
pause 1500
low 2
goto main
But when I link them up on two experiment boards and try and get them to work together and communicate it doesn't work.
I was wondering if anyone would be able to help please as this is for my a level project?!?