Skip to first unread message

Mala Dies

unread,
Oct 1, 2017, 7:06:07 PM10/1/17
to BeagleBoard

Mala Dies

unread,
Oct 3, 2017, 5:59:09 PM10/3/17
to BeagleBoard
Hello...

I was using the Motor Bridge Cape with the BBG. I have some software to make the motors go and go again. Are there any people in our community using this MBC (Motor Bridge Cape)? If so, awesome! If not, get one and we can program some motors with Python. Cool?

Seth

P.S. My software is as follows for now. I think this will bring my motors to a dual direction until the proper commands at the end that will make the machine turn in a U-format, e.g. a basic u-shape done after going forward.

import MotorBridge
import time

MotorName        = 1
MotorName        = 4
ClockWise        = 1
CounterClockWise = 2
PwmDuty          = 90
Frequency        = 1000

if __name__=="__main__":
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    for i in range(1, 51):
        motor.DCMotorMove(1, 1, 90)
        time.sleep(0)
        print "I got your biscuit, now!"
        motor.DCMotorStop(1)
        time.sleep(0)
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(4, 1000)
    for i in range(1, 51):
        motor.DCMotorMove(4, 1, 90)
        time.sleep(0)
        print "I got your other biscuit, too!"
        motor.DCMotorStop(4)
        time.sleep(0)

#Making a U-Shape in the lawn
#Left motor on chasis goes while the right motor ccw
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    for i in range(1, 2):
        motor.DCMotorMove(1, 1, 90)
        time.sleep(0)
        motor.DCMotorStop(1)
        time.sleep(0)
        print "I love Jim's TURN!"
    motor.DCMotorInit(4, 1000)
    for i in range(1, 2):
        motor.DCMotorMove(4, 2, 90)
        time.sleep(0)
        motor.DCMotorStop(4)
        time.sleep(0)
        print "I love Lucy's TURN!"
Reply all
Reply to author
Forward
0 new messages