joshzstuff
New Member
Hello all,
I am working on a surveillance program with a PicAXE 08M.
The controller will turn on a camera when it senses motion.
After it times out (in 30 sec) it will turn the camera off, however if it senses motion during the 30 seconds, I want it to "re-trigger" the wait/pause back to 30 seconds. (for each sensor output)
This might be a command that I don't know about, I'm still new here, but here are the problems I've run into with solutions I've tried:
1) created a subroutine that cycles past a pause and an "if" statement for the sensor input (decision in logicator . . . told you I was new )
Repeating this the appropriate number of times to achieve my delay.
problem: only responds to sensor input when on the "if" statement, not when in the "pause" state.
(this may work if I cycled it down to a faster pause time, but without the working code I can't tell if the input is affecting the circuit)
Even with the above attempt, I don't know how to re-trigger the process.
2) check for a number of appropriate pulses to trigger the input
(a subroutine cycle)
Problem: not sure of the code to implement this or if it's possible.
3) using a "inc" or "dec" command in a subroutine (like #1 example)
Problem: the command to reset the variable is giving me an error in simulation.
4) use the "interupt" command
problem: I believe I may only use this once in a program, and I'll need it at least twice if I use it in this way.
Here is a flow chart of the entire project:
Thanks!
I am working on a surveillance program with a PicAXE 08M.
The controller will turn on a camera when it senses motion.
After it times out (in 30 sec) it will turn the camera off, however if it senses motion during the 30 seconds, I want it to "re-trigger" the wait/pause back to 30 seconds. (for each sensor output)
This might be a command that I don't know about, I'm still new here, but here are the problems I've run into with solutions I've tried:
1) created a subroutine that cycles past a pause and an "if" statement for the sensor input (decision in logicator . . . told you I was new )
Repeating this the appropriate number of times to achieve my delay.
problem: only responds to sensor input when on the "if" statement, not when in the "pause" state.
(this may work if I cycled it down to a faster pause time, but without the working code I can't tell if the input is affecting the circuit)
Even with the above attempt, I don't know how to re-trigger the process.
2) check for a number of appropriate pulses to trigger the input
(a subroutine cycle)
Problem: not sure of the code to implement this or if it's possible.
3) using a "inc" or "dec" command in a subroutine (like #1 example)
Problem: the command to reset the variable is giving me an error in simulation.
4) use the "interupt" command
problem: I believe I may only use this once in a program, and I'll need it at least twice if I use it in this way.
Here is a flow chart of the entire project:
Thanks!