Mr. Dennis,

Seth here again. I got the software changed to P9_22 and tested the change 
in pin at P9_22. It makes the LED blink on and off repeatedly until I use 
control-c. 

Seth

P.S. Now, I read what you described. Thank you for the "En" ideas and info. 
I will try to dedicate some time to promoting this to software. 



On Thursday, May 3, 2018 at 9:06:04 PM UTC-5, Mala Dies wrote:
>
> Hello Sir,
>
> Seth here. Otay! LED hooked up and running on and off. Here is the 
> software:
>
> import Adafruit_BBIO.GPIO as GPIO
> import time
>
> GPIO.setup("P9_21", GPIO.OUT)
>
> while True:
>     GPIO.output("P9_21", GPIO.HIGH)
>     time.sleep(3)
>     GPIO.output("P9_21", GPIO.LOW)
>     time.sleep(5)
>
> I hooked up the P9_21 pin. Now, off to test P9_22. I will let you know.
>
> Seth
>
> On Thursday, May 3, 2018 at 8:32:52 PM UTC-5, Dennis Lee Bieber wrote:
>>
>> On Thu, 3 May 2018 15:06:55 -0700 (PDT), Mala Dies 
>> <[email protected]> declaimed the following: 
>>
>>
>>
>> >P.S. I understood what you typed in your last e-mail post in this forum 
>> on 
>> >this subject. I was not expecting any certain outcome. I was testing 
>> >software w/ this motor driver to see if things would just make the 
>> motors 
>> >turn. It is that simple. Now, if the motors did turn and the recorded 
>> >effect was pleasing, I would not have to change anything. But, if the 
>> >motors turned incorrectly for me, I would then investigate further what 
>> I 
>> >could do w/ the software to change this fact. 
>> > 
>>
>>         Take the motor controller out of the equation... 
>>
>>         Run the GPIO through a decent resistor and LED (high side to 
>> GPIO, low 
>> side to GND -- so the LED glows when the GPIO is set HIGH). Look at any 
>> decent source for examples of LEDs from BBB (since the BBB has such low 
>> power-handling you need to ensure the LED doesn't draw too much current). 
>>
>>
>> http://www.toptechboy.com/beaglevone-black-rev-c/beaglebone-black-lesson-5-blinking-leds-from-gpio-pins/
>>  
>>
>>         Watch the LEDs -- if they don't change when running your code, 
>> then 
>> either you are not commanding the GPIOs or your GPIO pins are 
>> damaged/dead. 
>>
>>         Until you can see the GPIO LEDs changing with commands in your 
>> program, 
>> anything else is irrelevant! 
>>
>>         Then you can get fancier -- wire a pair of LEDs in opposite 
>> directions 
>> (pick a green and a red) OR find a dual-color LED as used in 
>> http://www.instructables.com/id/The-RedGreen-LED-Guide/ 
>> and then connect (with resistor) to the two GPIOs you intend to use for 
>> one 
>> motor. Basically, this configuration will have the LED OFF if both pins 
>> are 
>> the same state (motor stopped) and will show either green or red 
>> depending 
>> on the direction you are driving the motor. 
>>
>>
>> ---- 
>>
>>         As for the Enable pins... The spec sheet has some confusingly 
>> nasty 
>> comment 
>>
>> """ 
>> Turn-On and Turn-Off : Before to Turn-ON the Supply Voltage and before to 
>> Turn it OFF, the Enable input must be driven to the Low state. 
>> """ 
>>
>>         Taken literally, you can't just jumper them. You will need (at 
>> least) 1 
>> GPIO (you could tie it to both En-A and En-B to toggle them both at the 
>> same time) and set it HIGH before controlling the drive inputs. 
>>
>>         You then need to set the inputs for a motor to OPPOSITE states to 
>> drive 
>> the motor -- setting both to the same state is a STOP condition. That 
>> means 
>> you need one input HIGH and the other input LOW /per controller channel/. 
>> See the table in figure 6 (of the Sparkfun link, though I think both were 
>> the same document). 
>>
>> En=HIGH, "C"=HIGH, "D"=LOW => "Forward" 
>> En=HIGH, "C"=LOW, "D"=HIGH => "Reverse" 
>> En=HIGH, "C" and "D" both HIGH OR LOW => HARD STOP 
>> En=LOW, "C" and "D" can be anything => Soft/coast STOP 
>>
>>         Presuming you use one GPIO for both ENables, you need five total 
>> GPIOs 
>> to handle two motors. 
>>
>>
>> -- 
>>         Wulfraed                 Dennis Lee Bieber         AF6VN 
>>         [email protected]    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/16c32b9b-b239-444b-b5df-44d6ab9d1b8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to