In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: As many of you may know I have been working on a Digital Counting Coin Bank which works well if I only used pushbutton switches to represent coin droping (e.g. 1 pushbutton for a penny, 1 pushbutton for a quarter, etc.). Here is the posting for detail: [url=http://forums.parallax.com/forums/default.aspx?f=15&m=200997]http://forums.parallax.com/forums/default.aspx?f=15&m=200997[/url] However, the coin droping switch mechinism was a bit more complicated then I planned and it isn't as simple as just hitting a single pushbutton for each coin drop. It is spring loaded (see attachment JPG) and always rests at the default position. When a coin is dropped (e.g. a Quarter) it slides the metal bar over the contacts (from the default, over the dime, over the penny, over the nickel and then to the quarter. THEN...it springs back over the nickel, over the penny, over the dime and finally rests back on the default). So, to simulate this...the user has to press: 1. a default button 2. a dime button 3. a penny button 4. a nickel button 5. a quarter button 6. a nickel button 7. a penny button 8. a dime button 9. a default button Not so simple and surely not just a single pushbutton (e.g. a quarter) that I had not thought out yet. How is it possible to check for a "quarter" button press knowing it has to travel from default to quarter and then back to default again? I was thinking it might be related to checking for timing via PAUSE statements but not quite sure about this. If anyone can post their ideas, I would be happy to listen and gratefull. (Besides the coin drop switch jpg, I have also attached the current working program - if only single pushbuttons were used.) Thanks again! ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=209451 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)