Shop Learn
What's a Microcontroller Digital Input-Pushbuttons - Page 2 — Parallax Forums

What's a Microcontroller Digital Input-Pushbuttons



  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-11-01 21:41

    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.

  • 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.

  • 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.

  • 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}
    DEBUG ? IN3
    PAUSE 250

  • 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.

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

    Those are Busboard Prototyping Systems jumper wires.

    We like 'em!
  • As you're using the BS2 consider STOP versus END.

  • 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:

  • 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.
  • Which digital scale you have used for your project?

  • Mr Dixon

    Thank you for your response.

    This is an old post.

    Happy Holidays!
Sign In or Register to comment.