Andrei Reaboi
Member
Hi everyone.
First of all wanna say how good this forum is and i learned alot already.
I have a project that i almost finished.
Im using Picaxe18X for it.
The picaxe is connected to a relay on one of the outputs also has 3 inputs(all push switches).
First input is the main one, the push switch is always on and will triger the relay when the switch is off. I have a particulat time for which the relay will stay on(0.1sec) once switch is activated. Thats the easy part.
I also need two more push switches using which i wanna be able to change time for which the relay stays on in incrisments of 0.05sec would say. This time has to be a constant. After powering the picaxe off and back on again i need for that constant to be same as it was before picaxe was turned off.
So one switch for relay, one switch for adding more time and one for decrising the time.
Please have a look at my code below (just a basic one without time adjustable switches):
In the above code i also have an LED which would light when relay is trigered. Im also planing of installing one or two more LEDs to indicate when "kill" time adjusting buttons are presed.
Was also wondering if possible to use time adjusting switched if pressed together to reset time to a default one of would say 0.1sec.
Thank you very much.
First of all wanna say how good this forum is and i learned alot already.
I have a project that i almost finished.
Im using Picaxe18X for it.
The picaxe is connected to a relay on one of the outputs also has 3 inputs(all push switches).
First input is the main one, the push switch is always on and will triger the relay when the switch is off. I have a particulat time for which the relay will stay on(0.1sec) once switch is activated. Thats the easy part.
I also need two more push switches using which i wanna be able to change time for which the relay stays on in incrisments of 0.05sec would say. This time has to be a constant. After powering the picaxe off and back on again i need for that constant to be same as it was before picaxe was turned off.
So one switch for relay, one switch for adding more time and one for decrising the time.
Please have a look at my code below (just a basic one without time adjustable switches):
Code:
main:
`setfreq m8
symbol kill=1000
label_6:
if pin0=0 then label_11
goto label_6
label_11: high 1
high 0
pause kill
low 0
low 1
label_12: if pin0=0 then label_12
goto main
Was also wondering if possible to use time adjusting switched if pressed together to reset time to a default one of would say 0.1sec.
Thank you very much.
Last edited: