Hello Sir,

Seth here, again. Thank you very much for your words. The ideas you have 
shared have helped thus far. I have been able to make my motor turn. Here 
is some software that may make no sense but I will keep on trying:

import Adafruit_BBIO.GPIO as GPIO
import time
from time import sleep

EnA = "P9_21"
ln1 = "P9_22"
ln2 = "P9_12"

print "Initialize"

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

GPIO.output("P9_21", GPIO.LOW)
GPIO.output("P9_22", GPIO.LOW)
GPIO.output("P9_12", GPIO.LOW)

while True:

    for i in range(10):
        EnA = GPIO.output("P9_21", GPIO.HIGH)
    for i in range(3):
        ln1 = GPIO.output("P9_22", GPIO.HIGH)
    for i in range(5):
        ln2 = GPIO.output("P9_12", GPIO.HIGH)
    for i in range(4):
        ln1 = GPIO.output("P9_22", GPIO.LOW)
    for i in range(10):
        EnA = GPIO.output("P9_21", GPIO.LOW)
        print "Go, Go Bananas!"

        try:
except KeyboardInterrupt:
    print "I got it over w/!"
GPIO.cleanup()
quit(sleep)

I think this may just make the motor turn at a very slow pace. I stop the 
software and the motor turns at a regular pace. W/ this software, I have 
not been able to turn the motor in reverse yet. I will change up the 
software soon.

Seth

P.S. If you see where the software is defaulting to an error, please let me 
know. It runs but it does not do what I would have expected it to do (thus 
far). 

On Saturday, May 5, 2018 at 11:21:12 AM UTC-5, Dennis Lee Bieber wrote:
>
> On Fri, 4 May 2018 22:01:02 -0700 (PDT), Mala Dies 
> <[email protected] <javascript:>> declaimed the following: 
>
> >Okay Sir, 
> > 
> >I am going to set up one motor first, get that one motor working, and 
> then 
> >use similar software to run both motors. Thank you for the pointers. I 
> was 
> >unaware of each motor needing three wires from the BBB to the motor 
> driver 
> >for forward, reverse, and backwards. 
> > 
>         The three wires are one for enable, and two together that control 
> direction (it is not one wire for forward and one for reverse -- High/Low 
> is one direction, Low/High is the other direction, and when High/High OR 
> Low/Low it is STOP). 
>
>         Consider if you connected the motor directly to a battery -- one 
> wire 
> is + the other is -; to reverse the motor direction you have to swap the + 
> and - leads... That's what the High/Low vs Low/High combination is doing 
> -- 
> telling the controller to swap the power through the driver transistors. 
> The Enable acts like a power switch in-line with one of the wires. 
>
> https://en.wikipedia.org/wiki/H_bridge (the controller IC is smart enough 
> to prevent the short-circuit condition) 
>
>
> -- 
>         Wulfraed                 Dennis Lee Bieber         AF6VN 
>         [email protected] <javascript:>    
> HTTP://wlfraed.home.netcom.com/ 
>
>

-- 
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/1dc42630-4a20-43f5-acb2-68ace22aff8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to