Shop OBEX P1 Docs P2 Docs Learn Events
Could really use some help on a project. — Parallax Forums

Could really use some help on a project.

mkockx12mkockx12 Posts: 3
edited 2010-03-17 01:33 in BASIC Stamp
Hello,

It's been a while since I've used this board and don't really want to learn it all over again. I need a program that, when a magnetic sensor is triggered, starts the program. This program will complete and stay dormant until the sensor is disconnected and then it will rerun the program when triggered again. The program needs to initiate a servo to go to a certain position, stop; turn a relay on for a given period of time, stop; return the servo to a home position. It would be nice if in the event the power is interrupted, the program will put the servo into the home position and check for the magnetic connection when power is restored. I would be eternally grateful if somebody is willing to work with me on this. I can do it through the forum or if you live in sac we could meet up to make things easier.

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2010-03-17 00:50
    mkockx12

    How will the servos move to home if the power is lost?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
  • mkockx12mkockx12 Posts: 3
    edited 2010-03-17 01:04
    I want it to return home as soon as it is plugged back in. That way the attachment to the servo is out of the way.
  • silverbacksilverback Posts: 40
    edited 2010-03-17 01:19
    Use a initiation sequence that checks and resets the servo to your home position before it starts looking for the sensor.

    You might want to include, in the reset initialization sequence, something the makes sure that if the sensor is engaged at the time power is restored, it waits for the sensor be disconnected before it starts the routine again. That way you don't have to worry about it starting up·unattended (after a power up).

    What kind of sensor are you going to use? A Reed switch or a Hall effect transistor?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you convince yourself that something is impossible before you even try; you are sure to prove yourself right.
  • mkockx12mkockx12 Posts: 3
    edited 2010-03-17 01:33
    I was thinking of a read switch unless somebody thinks that wouldn't work better
Sign In or Register to comment.