Shop OBEX P1 Docs P2 Docs Learn Events
RoamingWithPING — Parallax Forums

RoamingWithPING

lobolobo Posts: 100
edited 2006-03-23 00:27 in BASIC Stamp
I'am using two motor instead of servos,two ir pairs·for this project along with the parallax PING)))™ Ultrasonic Sensor.

can someone tell me or show me how to modify this program accordingly to use the motors?

right motor is connected to pin 3 and 4
left motor is connected to pin 0 and 1

the ultrasonic sensor is connected to pin 11

and the irs are connected to the following pins:

15 detecter
14 transmiter

10 detecter
9 transmiter
This is probably more info than necessary but here it is anyway.

Thank ya for yas help!

Comments

  • Tom WalkerTom Walker Posts: 509
    edited 2006-03-22 14:17
    Believe it or not, a little more information is needed. How are the motors attached? If you are expecting to just attach the motors to the Stamp without any drive circuitry, then expect the Magic Smoke to go elsewhere [noparse]:)[/noparse]

    Try to break your problem (wandering robot) into functional units (ultrasonic, IR, motor movement). Most of it has already been done with the demonstration programs for each of the sensors, and many examples on these fora for running motors). Tackle each problem individually to design a "function" for each item. Then you can mix and match them in a program so that you can concentrate on the "logic" necessary to call the "functions". Check out "The Elements of PBASIC Style" to get an idea of how programs should "look" to make them easy to understand and change.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • lobolobo Posts: 100
    edited 2006-03-22 14:26
    the motors are connected to the basic stamp2 pins i mentioned above. i'm using a h-bridge offcourse with 4 relays and two optoisolators.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-22 17:18
    Without knowing the specifics of the motor driver it would be difficult to guide you in changes.· It sounds like the driver doesn't have speed control.· Is this correct?· Also, what states do the lines need to be in for control (truth table)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • lobolobo Posts: 100
    edited 2006-03-23 00:27
    i'am using this hbridge that i build untill the hb25 comes out when ever that is.this is my left motor setup my right motor is 3 and 4 high 0 'motor onpause 2000low 0 'motor offpause 20high 1 'reverse directionpause 20high 0 'motor onpause 2000low 0 'motor offpause 20low 1 'relay off
    ·
    ·
    800 x 669 - 10K
Sign In or Register to comment.