import Adafruit_BBIO.GPIO as GPIO
import time

GPIO.setup("P9_21", GPIO.OUT)
GPIO.setup("P9_22", GPIO.OUT)
GPIO.setup("P9_12", GPIO.OUT)
GPIO.setup("P9_15", GPIO.OUT)

m1a = GPIO.output("P9_21", GPIO.HIGH)
m1a = GPIO.output("P9_22", GPIO.HIGH)
m1b = GPIO.output("P9_12", GPIO.HIGH)
m1b = GPIO.output("P9_15", GPIO.HIGH)

while (True):

        try:
                for motor in range (0, 101, 1): #starts at 0, steps up to 
101 in 1 steps
                    m1a = ("P9_21")
                    time.sleep(3)
                    print(motor)
                for motor in range (0, 101, 1):
                    m1a = ("P9_22")
                    time.sleep(3)
                    print(motor)
                for motor in range (100, -1, -1):
                    m1b = ("P9_12")
                    time.sleep(3)
                    print(motor)
                for motor in range (100, -1, -1):
                    m1b = ("P9_15")
                    time.sleep(3)
                    print(motor)

        except(KeyboardInterrupt):

                #And final cleanup
                print "You have just ended your camp trip!"
                GPIO.cleanup()
                quit()

Hello,

I am trying to use this software w/ the L298 and the BBB w/ two DC 
brushed motors.

If you can see where I have gone wrong, please chime in. I am running out 
of ideas. I keep trying to support new software for this motor driver but I 
keep ending up empty.

The motors will not turn.

Seth

P.S. So, if you have some extra time, please reply.

On Wednesday, April 18, 2018 at 6:20:20 PM UTC-5, Mala Dies wrote:
>
> Hello,
>
> I have a L298 Motor Driver. I was wondering a couple of things.
>
> First:
>
>
>    - Do I need only software to type up to interface w/ motor drivers?
>
> Second:
>
>
>    - While interfacing w/ this driver, do I need to make a library?
>
>
> If you have time, please view these ideas if you are willing to relay 
> info. back to me:
>
>
>    - http://www.st.com/en/motor-drivers/l298.html
>    - https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf
>    
>
> Oh and please look over my specific motor driver and the schematic here:
>
>
> <https://lh3.googleusercontent.com/-rNBT-OyaXF8/WtfSOJngyRI/AAAAAAAAJ6A/xq8-9J8U71U4jZtrKo-6J3T8PRXq4PImgCLcBGAs/s1600/ForBBB.PNG>
>
> Hopefully...this is enough info. for you to relate to my dilemma. 
>
> Seth
>
> P.S. If you get bored, please do not hesitate to contact me. Thank you to 
> anyone for support. There is a eight pin jumper that I have had some 
> trouble w/ so far. I am not sure where to put the jumper pins.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7fff7eaf-b3e7-4924-9deb-c3938b63ff9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to