Shop OBEX P1 Docs P2 Docs Learn Events
Problem with button sensitivity. — Parallax Forums

Problem with button sensitivity.

mosquito56mosquito56 Posts: 387
edited 2009-04-09 00:30 in Propeller 1
· I am trying to connect a switch to the breadboard. 3.3v--button--pin. When I push the button it changes from one screen to the next. The problem is whenever I touch a wire, pass my hand over the breadboard, or even bump the table it·switches screens.

·I am wearing a groundstrap connected to my computer case.

I am using this code only.

·· repeat while ina[noparse][[/noparse]20]==0
···· page1
page2

I have solved the bounce problem but this is making me crazy. I seached the forum and tried to find it in the hold button down for x time and light blinks depending on how long button held but I can't seem to find it.

·Any help or suggestions?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······

······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········

Comments

  • mctriviamctrivia Posts: 3,772
    edited 2009-04-09 00:22
    do you have pull up or pull down resisters on the input?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • mosquito56mosquito56 Posts: 387
    edited 2009-04-09 00:24
    No, do I need them? ·I assume a pull-down but never understood them to be honest.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-09 00:26
    yes you need. if your switch is to ground then you need pull up. if to positive you need pull down. otherwise the input will fluctuate based on noise of things around it like you are getting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • mosquito56mosquito56 Posts: 387
    edited 2009-04-09 00:29
    That got it. I connected a meg resistor to the pin. No sensitivity at all.


    THANKS A BUNCH!!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-09 00:30
    normally 10 to 20k is best

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
Sign In or Register to comment.