Shop OBEX P1 Docs P2 Docs Learn Events
inputs — Parallax Forums

inputs

smkbaynsmkbayn Posts: 25
edited 2006-10-03 21:28 in BASIC Stamp
i am using the bs2 on my sumo bot to do some playing around with the ds1620 (temp chip) and an lcd.· what i want to do,·simply i thought, was to·create an output based on ambient temp versus my set point and view that on my lcd.· like a thermostat in your house kind of.· so in my program i increment a variable, with a half second delay, continuously with a loop until the button is released.· problem is, when i release the button the input seems to run for an undetermined amount of time.· i watch it on the lcd and on the debug screen and it is high even when i release the button.· i am used to plc inputs and maybe there is something i am missing here.· can someone please help???????

thank you·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-02 16:53
    Hello,
    ·
    ·· If you·could please post your code we may be able to get some insight as to what is happening.· In the interim I have some BS2 Thermostat Code I have previously posted which used the DS1620.· I can repost it if you think it might be of some use.· It controls the Furnace Relay based on the Set Temp VS Current Temp.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support


    Post Edited (Chris Savage (Parallax)) : 10/2/2006 10:57:51 PM GMT
  • metron9metron9 Posts: 1,100
    edited 2006-10-02 20:16
    Somebody said...
    problem is, when i release the button the input seems to run for an undetermined amount of time

    Sounds like your pin is floating, use a pulldown resistor to make sure the logic level is low when the button is not pressed.

    10K resistor from the pin to ground should do it..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!
  • smkbaynsmkbayn Posts: 25
    edited 2006-10-03 13:42
    my pin was actually floating.· like i said im used to wiring plc's and that stuff is all done internally.· i would love to see that code though chris.· thanks.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-03 21:28
    Okay,
    ·
    ·· Since there was a recent thread where I had posted the Digital Thermostat Code I will just link to that thread.· It is close to the end of the thread.· You will see the message with the attachments.· I hope this helps anyone trying to do something similar.· Take care.
    ·
    http://forums.parallax.com/forums/default.aspx?f=5&m=140311&p=2&ord=d

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.