Expression Chip:
Code:N@ WaitOneSecond I@ Button O@ Value first() -> Value = 1; If Button == 1 -> Value = 0; schedule(1000); clk() -> Value = 1;
I need to have a chip that resets to zero on input, stays at zero for about a second, then go to one, and stay there until it resets to zero
hopefully one of u will help me![]()
"Sir we are surrounded."
"Excellent! We can attack in any direction now!"
Expression Chip:
Code:N@ WaitOneSecond I@ Button O@ Value first() -> Value = 1; If Button == 1 -> Value = 0; schedule(1000); clk() -> Value = 1;
lalanotlistening,Code:N@ WaitOneSecond I@ Button O@ Value first() -> Value = 1; ~Button&Button&Value-> Value=0 schedule(1000); clk() -> Value = 1;
The ; after your value=0 shouldn't be there.
DarthRouge,
~Button&Button&Value->
the &Value part prevents the second pause to be restarted while counting.
Make it:
~Button&Button->
if you don't want that.
Your sig made my laugh out loud by the way![]()
A way to do it without an expression chip (because they are for wusses) would be to have a constantly running timer, and have a greater than chip comparing the timer value and a constant value of 1. Then, the Reset input of the timer will make the timer go back to 0, and then it will take 1 second before the greater-than chip will go back to outputting one
Bookmarks