inputs
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·
thank you·
Comments
·
·· 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
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!
·
·· 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