+ Reply to Thread
Results 1 to 8 of 8

Thread: Wired Keypad Value

  1. #1
    Wire Noob BirdBlack's Avatar
    Join Date
    Feb 2007
    Posts
    6

    Default

    I'd like to see a keypad that accepts a string of entered numbers, and then reports that value when queried.
    I would guess such a thing would require the ability to clear it.
    I suppose what I am describing is a dynamic constant value.

    I ask this from my room, on the second floor of a vacant lot.

    Thank you.

  2. #2
    Wire Noob Wiff23's Avatar
    Join Date
    Jul 2007
    Location
    Central US
    Posts
    4

    Default

    Do you mean something like this or something like a chip where you can enter values from some other method?

  3. #3
    Wire Amateur MurmeliWirer's Avatar
    Join Date
    Jun 2007
    Posts
    51

    Default

    Well, it can be done with expression gate, lucky for you I have been making a wired keypad contraption without using the addon, you just need buttons 1234567890 and all the buttons should have the value that their model has 3 = 3, 4 = 4 for example and then you need 2 add- gates (one doesn't have enough inputs ) and one expression with @I Number Reset and @O Constant and code:
    Number -> Constant = Constant * 10 + Number;
    Reset -> Constant = 0;
    and then wire one add gate to numbers 1 - 8 and another to the 9 and the first add, then wire expression input "Number" to the Add what you wired to the another add + 9 and reset to the reset button. Then just wire screen to the constant to show what value is on it currently.

  4. #4
    Wire Noob BirdBlack's Avatar
    Join Date
    Feb 2007
    Posts
    6

    Default

    I think MurmeliWirer has the right idea.

    What I mean is a keypad that has a dynamic value.

    If you wire a thruster to this keypad and don't type anything into it, the value of the keypad is 0. However if you enter a 100 into the keypad, the value is 100 and so on.
    There would need to be a clear key to take it back to 0 and let you enter a different value.

  5. #5
    Wirererer undead82004's Avatar
    Join Date
    May 2007
    Location
    Fort Worth, Texas
    Posts
    320

    Default

    lets do it
    You put the plug in the socket.
    ive got 2 tickets to paradise..in my pants.

  6. #6
    Wire Noob spbogie's Avatar
    Join Date
    Feb 2007
    Posts
    9

    Default

    Here's my E-Gate for it. Supports 0, Reset, Backspace, and Negative.
    Code:
    N@KeyPad
    I@K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 R B Neg
    O@Num
    first() -> Num = 0;
    N = 0
    R -> Num = 0, end;
    B & Num > 0 -> Num = floor( Num / 10 ), end;
    B & Num < 0 -> Num = ceil( Num / 10 ), end;
    K0 -> Num *= 10, end;
    K1 -> Num *= 10, N = 1;
    K2 -> Num *= 10, N = 2;
    K3 -> Num *= 10, N = 3;
    K4 -> Num *= 10, N = 4;
    K5 -> Num *= 10, N = 5;
    K6 -> Num *= 10, N = 6;
    K7 -> Num *= 10, N = 7;
    K8 -> Num *= 10, N = 8;
    K9 -> Num *= 10, N = 9;
    N & Num < 0 -> Num -= N, end;
    Num += N
    Neg -> Num *= -1, end;
    All inputs are simple bool values, and the output is the number.

  7. #7
    Wire Noob cwal729's Avatar
    Join Date
    Mar 2008
    Posts
    22

    Default Re: Wired Keypad Value

    Quote Originally Posted by spbogie View Post
    Here's my E-Gate for it. Supports 0, Reset, Backspace, and Negative.
    Code:
    N@KeyPad
    I@K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 R B Neg
    O@Num
    first() -> Num = 0;
    N = 0
    R -> Num = 0, end;
    B & Num > 0 -> Num = floor( Num / 10 ), end;
    B & Num < 0 -> Num = ceil( Num / 10 ), end;
    K0 -> Num *= 10, end;
    K1 -> Num *= 10, N = 1;
    K2 -> Num *= 10, N = 2;
    K3 -> Num *= 10, N = 3;
    K4 -> Num *= 10, N = 4;
    K5 -> Num *= 10, N = 5;
    K6 -> Num *= 10, N = 6;
    K7 -> Num *= 10, N = 7;
    K8 -> Num *= 10, N = 8;
    K9 -> Num *= 10, N = 9;
    N & Num < 0 -> Num -= N, end;
    Num += N
    Neg -> Num *= -1, end;
    All inputs are simple bool values, and the output is the number.
    Thanks I needed a keypad expression

  8. #8
    Wire Sofaking IEF015's Avatar
    Join Date
    Feb 2008
    Location
    London, ON (Canada, eh?)
    Posts
    1,640

    Default Re: Wired Keypad Value

    Quote Originally Posted by cwal729 View Post
    Thanks I needed a keypad expression
    That was an unneccessary bump.



    :clap:
    "It's my favourite country song. And I hate it."

+ Reply to Thread

Similar Threads

  1. Can someone fix the wired keypad?
    By Beer in forum Wiremod General Chat
    Replies: 4
    Last Post: 07-15-2008, 01:33 PM
  2. Wired Keypad
    By LazyJet in forum Bug Reports Archive
    Replies: 3
    Last Post: 09-19-2007, 12:45 PM
  3. Wired Keypad
    By kevkev in forum Wiremod General Chat
    Replies: 4
    Last Post: 08-15-2007, 11:53 AM
  4. Where's my Wired Keypad?
    By Notething in forum Installation and Malfunctions Support
    Replies: 6
    Last Post: 07-07-2007, 01:22 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