What's a Microcontroller Digital Input-Pushbuttons

2»

Comments

  • microcontrollerusermicrocontrolleruser Posts: 546
    edited November 1 Vote Up0Vote Down
    Jon

    Been using our Serial to USB adapter.

    Not so much of a problem with USB as it is with full serial cable or parallel cable.

    Early Stamp 1 kits were parallel port.

    Will post picture of shunt circuit later.

    Then will do first circuit with Stamp pin connected to circuit.

    Will clear up this 'active low' and 'active high' question.

    May have figured it out already but will finish the lessons to confirm it.

    JUNIOR ENGINEER

  • Building 'Reading Pushbutton' circuit.

    Parallax does a good job at keeping things simple.

    It is connection to Stamp only circuit without an LED.

    Will post picture of it tomorrow.
    JUNIOR ENGINEER

  • Circuit is built.

    Will connect up Homework board with Serial to USB adapter tomorrow.

    Then run program and test it.

    Will test Stamp Stack 2P24 board with Serial to USB adapter too while I'm thinking about it.

    It did not like Startech Serial adapter cable or card.
    JUNIOR ENGINEER

  • Cut and pasted code into Stamp Editor new program.

    Save with this title (Cut and pasted).

    Had made a folder in BS2 directory named Programs.Saved to there.

    Will connected up board with finished circuit and run it later this afternoon.

    Took time to assemble den tower computer before doing this. Other project.
    'What's a Microcontroller - ReadPushbuttonState.bs2
    ' Check and send pushbutton state to Debug Terminal every 1/4 second.
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    DO
    DEBUG ? IN3
    PAUSE 250
    LOOP
    
    JUNIOR ENGINEER

  • Ran program. It worked.

    Had to create an END program.

    Every time I connected battery after running this 'endless loop' type program the Programming LED on board was on.

    Ran END program and LED went off.

    Don't like to have the little Stamp thrashing away.
    JUNIOR ENGINEER

  • Here's a picture of 'ReadPushButtonState' circuit.

    Those are Busboard Prototyping Systems jumper wires.

    We like 'em!
    JUNIOR ENGINEER
  • As you're using the BS2 consider STOP versus END.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.

  • Jon

    Keep in mind that is a separate program.

    You can run it right after an endless loop type program to 'turn off' stamp.

    Chris Savage told me about that. Or maybe it was you.

    Right on this here forum! :smile:
    JUNIOR ENGINEER

  • Going to do the 'pull-up resistor' and then that's it for pushbutton chapter for me.

    Will move on to next chapter 'Controlling Motion'.

    It's about servo motors NOT stepper motors.

    Have to take care of other stuff before tackling stepper motors.
    JUNIOR ENGINEER
Sign In or Register to comment.