Shop OBEX P1 Docs P2 Docs Learn Events
Motor auto start when running the software. — Parallax Forums

Motor auto start when running the software.

dywleungdywleung Posts: 1
edited 2012-07-16 22:43 in BASIC Stamp
I have include Cout=0 in the program, why every time when I start to run the program, one of the motor auto run for a short period i.e.0.5 seconds then auto stop? Thank you.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-07-16 22:22
    Your code does not hold the motor stopped at the time you start the program.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-16 22:43
    During reset and before you set the pin as an output to zero, the Stamp's pins will float. That particular pin may be floating high, causing your motor driver to turn on. The remedy is a pull-down resistor (~10K) between that pin and ground (Vss), which will hold the pin low before your program has a chance to assert it as an output.

    -Phil
Sign In or Register to comment.