+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Reverting buttons? once toggleable buttons?

  1. #1
    Wire Noob AtomicTroop's Avatar
    Join Date
    Sep 2007
    Posts
    18

    Default

    Yeah, two questions.

    1. How to make a toggle button revert back to 0 after.... lets say.... 10 seconds...?
    2. How to make a toggle button to be able to be pressed to 1, but not back to 0?

    Thanks in advance, and sorry for such a noobish first post...

  2. #2
    Wirererer uoykcuf's Avatar
    Join Date
    Jul 2007
    Posts
    279

    Default

    U should make use of expressions
    like this:

    Code:
    N@Auto reset button
    I@Button
    O@Output
    interval(100)
    ~Button & Button -> Output = 1;
    Output & clk() -> Time += 1
    Time >= 100 -> Output = 0, Time = 0;
    For the auto resetting button
    and for the On and never off again button:
    Code:
    N@On and never off again button
    I@Button
    O@Output
    ~Button & Button -> Output = 1;
    Just make the buttons not toggled buttons,

    If u never had any experience in how to use expression, then please ask here and i (or someone alse) shal;l provide u help
    Creator of this Ram controller



    Click here if u experience wiremod error Problems

    92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.

    98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.

    It ain't broken, it just lacks ducktape

  3. #3
    Wirererer uoykcuf's Avatar
    Join Date
    Jul 2007
    Posts
    279

    Default

    AAAAAAAAAAAAAAA

    Srry for double post,
    we really need u remove button

    EDIT2: DAmnt even more, now my onehundreds post is a Double post :'(
    Creator of this Ram controller



    Click here if u experience wiremod error Problems

    92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.

    98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.

    It ain't broken, it just lacks ducktape

  4. #4
    Wire Noob Vampired's Avatar
    Join Date
    Sep 2007
    Location
    England
    Posts
    10

    Default

    For a button that goes on but not off, is that the same as an S-R Latch?

  5. #5
    Wirererer uoykcuf's Avatar
    Join Date
    Jul 2007
    Posts
    279

    Default

    For a button that goes on but not off, is that the same as an S-R Latch?[/b]
    U could indeed also just use an SR-Latch and hook the button op to S
    (and to reset it u could hook another button op to R )
    Creator of this Ram controller



    Click here if u experience wiremod error Problems

    92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.

    98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.

    It ain't broken, it just lacks ducktape

  6. #6
    Wirererer Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    393

    Default

    U should make use of expressions
    like this:
    Code:
    N@Auto reset button
    I@Button
    O@Output
    interval(100)
    ~Button & Button -> Output = 1;
    Output & clk() -> Time += 1
    Time >= 100 -> Output = 0, Time = 0;
    [/b]
    That is highly inefficient.

    Code:
    ~Button & Button -> Output = 1, schedule(10000);
    clk() -> Output = 0;
    Grammar is the difference between "helping your uncle, Jack, off his horse" and "helping your uncle jack off his horse".

  7. #7
    Wire Amateur Narc's Avatar
    Join Date
    Sep 2007
    Posts
    49

    Default

    That is highly inefficient.

    Code:
    ~Button & Button -> Output = 1, schedule(10000);
    clk() -> Output = 0;
    [/b]
    And that will reset the 10-second timer if the button is toggled off and back on again during the 10 second wait - which may or may not be desirable. Interval() won't reset, though.

  8. #8
    Wirererer Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    393

    Default

    And that will reset the 10-second timer if the button is toggled off and back on again during the 10 second wait - which may or may not be desirable. Interval() won't reset, though.[/b]
    If that's a problem, this solves it:

    Code:
    ~Button & Button & !Active -> Output = 1, schedule(10000), Active = 1;
    clk() & Active -> Output = 0, Active = 0;
    But you do not want to use interval, it's a waste of resources to keep triggering the expression all the time. (so I'm a perfectionist, so what?)
    Grammar is the difference between "helping your uncle, Jack, off his horse" and "helping your uncle jack off his horse".

  9. #9
    Wire Noob AtomicTroop's Avatar
    Join Date
    Sep 2007
    Posts
    18

    Default

    So Core.... How could I combine that expression you posted and a S-R Latch?

    What I mean is, make a button that cant be reverted, but to avoid the consequences of pressing it myself accidentaly, I could press another, hidden button, to reset it back to 0 even before the 10 seconds have passed, causing the timer of 10 secs to reset because of button being 0 again?
    Any help would be appreciated, thank you...

    And Core, don't worry, I'm perfectionist too. Thats why I'm asking these things.

  10. #10
    Wirererer Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    393

    Default

    You don't need to combine anything, the SR-Latch does what you want on its own. Connect a button to the Set input. When you hit the button, the latch goes to 1 and stays there forever, until it gets a 1 on the Reset input (connect the reset button there)
    Grammar is the difference between "helping your uncle, Jack, off his horse" and "helping your uncle jack off his horse".

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. New Buttons
    By cheeze in forum Developer's Showcase
    Replies: 104
    Last Post: 01-11-2009, 07:12 AM
  2. More Buttons
    By IEF015 in forum Ideas & Suggestions
    Replies: 2
    Last Post: 05-14-2008, 01:31 PM
  3. 3 Buttons to 1?
    By Mimic in forum Installation and Malfunctions Support
    Replies: 7
    Last Post: 03-09-2008, 07:32 PM
  4. Need help with buttons
    By Talon876 in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 12-28-2007, 06:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots