I have been trying to use the picaxe to take the pwm signal that comes from a hobby radio reciever and use that to send output pins high and low to control relays. I believe the pwm signals a servo use are 75,125,225 for middle left and right positions. I would like to be able to set an input pins to recieve the pwm and when it gets 75 through 125 it turns the relay off and at 225 it turns the relay on. I dont really know how to use the pulsin or variables really. The last I tried is a modified version the code hippy showed me to make a camera sequencer.Im Kind of embarrassed to show what the code looked like because its probly not in the neiborhood of what it needs to be . But here it is:
pulsin 3,1w1
Do
Do : Loop While b1 = 0-125
Do : Loop While b1 = 225
LookUp b0
If b1 = 0-125
then low 1
if b1= 225
then high 1
Thanks for any help you guys can give me. I REALLY appreciate it.
pulsin 3,1w1
Do
Do : Loop While b1 = 0-125
Do : Loop While b1 = 225
LookUp b0
If b1 = 0-125
then low 1
if b1= 225
then high 1
Thanks for any help you guys can give me. I REALLY appreciate it.