Shop OBEX P1 Docs P2 Docs Learn Events
code for i/o pin swap — Parallax Forums

code for i/o pin swap

ArchiverArchiver Posts: 46,084
edited 2000-09-01 04:16 in General Discussion
I am operating a motor through a relay by an alarm however I need the
motor to operate 7 times activated by pin 1 then change to pin 2 for
7 times then repeat this cycle. Can anone help with a code for this.
Thanks Allen

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-08-29 19:36
    At 06:19 PM 8/29/00 -0000, you wrote:

    >I am operating a motor through a relay by an alarm however I need the
    >motor to operate 7 times activated by pin 1 then change to pin 2 for
    >7 times then repeat this cycle. Can anone help with a code for this.

    Umm, I completely don't understand what you are trying to do. Can you give
    more explanation?

    Duncan
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-29 19:57
    I am operating a motor driven belt which moves forward for 7 different time
    segments then I need to reverse the motor. I've been doing this by seperate
    relays to reverse leads to the motor. Each Alarm activates a different i/o pin
    thus I can drive 2 belts seperately with one motor. The system is actually
    operating 4 belts with 2 motors however I need to operate both motors forward
    for 7 days then in reverse for 7 days. I don't know if this explanation is any
    easier to follow. Thanks Allen
    Original Message
    From: orthner@s...
    Reply-To: basicstamps@egroups.com
    Date: Tue, 29 Aug 2000 14:36:34 -0400

    >At 06:19 PM 8/29/00 -0000, you wrote:
    >
    >>I am operating a motor through a relay by an alarm however I need the
    >>motor to operate 7 times activated by pin 1 then change to pin 2 for
    >>7 times then repeat this cycle. Can anone help with a code for this.
    >
    > Umm, I completely don't understand what you are trying to do. Can you give
    >more explanation?
    >
    >Duncan
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-01 04:16
    At 02:57 PM 8/29/00 -0400, Allen wrote:

    >I am operating a motor driven belt which moves forward for 7 different
    time segments then I need to reverse the motor. I've been doing this by
    seperate relays to reverse leads to the motor. Each Alarm activates a
    different i/o pin thus I can drive 2 belts seperately with one motor. The
    system is actually operating 4 belts with 2 motors however I need to
    operate both motors forward for 7 days then in reverse for 7 days. I don't
    know if this explanation is any easier to follow.

    Okay, I think I got it. If I understand you correctly, you want forward and
    reverse control of 2 motors? The circuit you want is an H-bridge. How big
    are these motors? Are they DC motors, what is their rated voltage and how
    many amps do they pull? These factors will determine what components you
    can use for your bridge...

    HTH, Duncan
Sign In or Register to comment.