BS2 Stay here and do this until...
Donny23
Posts: 8
I'm fairly new to the BS2 and in desperate need of some help with my current project.
Here's the basic idea..
If pin 3 goes high(momentary)
then pin 4 goes high(momentary)
activate clock and count time it takes until
pin 4 goes low
then pin 3 goes low.
example: car passes 3 then 4, sits there for how long before backing out passing 4 then 3.
Here's the basic idea..
If pin 3 goes high(momentary)
then pin 4 goes high(momentary)
activate clock and count time it takes until
pin 4 goes low
then pin 3 goes low.
example: car passes 3 then 4, sits there for how long before backing out passing 4 then 3.
Comments
It sounds like you want to count how long pin 4 stays high then count how long pin 3 stays high after pin 4 goes low.
This is a start, no guarantees that the syntax is correct;
http://forums.parallax.com/showthread.php/99363-DS1302-So-that-in-the-event-of-a-power-failure-with-a-SUPER-CAP-Can-Not-get-th?p=692989&viewfull=1#post692989
http://forums.parallax.com/showthread.php/102219-1-minute-timer-clock?p=717271&viewfull=1#post717271
http://www.savagecircuits.com/content.php?69-DS1302-Demo-Code
Note that in my example timer code the updates are event-driven. That is, they don't update anything until the seconds register changes.
I'm used to Atmel but, I'm coming to love the bs2 and parallax for many reasons including simplicity and versatility. I just hope there's a way to hide source codes if needed but let user still see the debug screen.
Pressing reset is a valid way of restarting the program. No one can see your code if you don't share it with them, because once it's downloaded to the BS2 it can't be read back. You don't need to have your source file open in the editor for the DEBUG window to function; you can open a DEBUG window without any code in the editor and still see what the BS2 is doing.