Shop OBEX P1 Docs P2 Docs Learn Events
input question — Parallax Forums

input question

ArchiverArchiver Posts: 46,084
edited 2003-02-12 20:24 in General Discussion
Hi ,

I want a program for bs2 that could check the value of input2 and if in2 = 0
then blink a led , if in2 = 1 then doubleblink a led . How could I do this ?(I
know that I must connect a pullup resistor to P2 but doing this the value of P2
would be high until I press the button connected to ground).

Thanks for your help ,

Thomas



Do You Yahoo!?

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-12 17:05
    In a message dated 2/12/2003 7:54:34 AM Pacific Standard Time,
    th_sak@y... writes:

    > Hi ,
    >
    > I want a program for bs2 that could check the value of input2 and if in2 =
    > 0 then blink a led , if in2 = 1 then doubleblink a led . How could I do
    > this ?(I know that I must connect a pullup resistor to P2 but doing this
    > the value of P2 would be high until I press the button connected to
    > ground).
    >
    > Thanks for your help ,
    >

    Can you give a little more information...

    Do you want both LED's off until some event (like pushing a button)? Please
    give a more detailed description. What you want to do is very easy though,
    just need more information...

    Ken


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-12 20:11
    I want a circuit with a two state button and 1 led.When I press the button in2
    = 1 I want the led to lit until in2 = 0.

    Thanks again ,

    Thomas





    Do You Yahoo!?
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-12 20:24
    At 08:11 PM 2/12/03 +0000, =?iso-8859-7?q?tik=20tak?= wrote:

    >I want a circuit with a two state button and 1 led.When I press
    >the button in2 = 1 I want the led to lit until in2 = 0.
    >
    >Thanks again ,
    >
    >Thomas
    >
    >Thomas -

    Unless I'm misunderstanding your requirement, you just need a switch with
    maintained contacts, as opposed to momentary ones. The action would be PUSH
    ON, PUSH OFF.

    Regards,

    Bruce Bates
Sign In or Register to comment.