Shop OBEX P1 Docs P2 Docs Learn Events
Button command delay question — Parallax Forums

Button command delay question

ArchiverArchiver Posts: 46,084
edited 2003-11-10 22:20 in General Discussion
I am writing a program for the BS2 that will send commands to the
serial port of an Epson data projector(at 9600 baud). The BS2 will
control power on and off as well as switching inputs and muting the
video. I have been able to make this all work pretty well so far
considering it has been many, many years since I have done any
programming (I am an electronics guy by trade).

The problem I have run into is with the Button command. In my
reading of the available literature it seems to me that I should be
able to program the BS2 so that it will not repeat when the switch is
held down using the delay parameter of the Button command. In the
text it says that when delay is set to 255 that it will debounce the
contacts but that it will not auto-repeat if the switch is kept
closed. Unfortunately this is not working for me. If I close the
switch contacts and leave them closed the commands get sent over and
over instead of once like I expect.

While I can probably program in enough of pause to keep this from
being a big issue I would like to solve this problem (it will be used
by college profs and needs to be beyonf absolutely foolproof). Am I
missing something really obvious here? I readily admit to being a
real newbie with the Basicstamp as well as not the sharpest coder in
the drawer so to speak. thanx matt
Sign In or Register to comment.