Shop OBEX P1 Docs P2 Docs Learn Events
Using The Button Command Two Different Routine — Parallax Forums

Using The Button Command Two Different Routine

sam_sam_samsam_sam_sam Posts: 2,286
edited 2006-10-04 04:37 in BASIC Stamp
Hi, EveyOne

I want to use the Button command to keep looking to see if it PIN gose low and run ONE routine then when it see the pin gose HIGH then run the SECOND routine i doing a project where i will running the BS2 on battery some of the time and some of the time
AC power

How would i do this.

Routine 1

With AC power have the output run the relays and leds


Routine 2

With battery No relays output and no leds On

This will be something that i will be doing very soon


Thank for any help that you can give in this matter

Sam

Comments

  • Last~Cell~LeftLast~Cell~Left Posts: 10
    edited 2006-09-28 10:31
    Something like this, ? I use a dual purpose switching as well on some projects,



    The basic idea I used works like this., ( i'll attach a simple run program of this )



    There probally is eaiser or cleaner code by others out there, but this is just my 2 cents, maybe to give ya some direction...



    hope it helps.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-10-04 04:37
    Last~Cell~Left

    Thanks for your Post that help alot this will do the job Thank You


    ·Sam




    ················································································································ ·`````
    ·······························This is·what i will look like for Holloween···················) ·smile.gif··^ ·smile.gif· (···· ·maybe~~~maybe not no one knows
    ·····························
    ················································································································ ··~~~



    ······························ Or i could look like these Guys····························· hop.gif····· jumpin.gif···· We just do not know just··an··· idea.gif


    ······················································································· Happy Holloween··· That· all folks
Sign In or Register to comment.