Hi, 

I test motor with this code
Well motor rotate in clock wise direction.   How do I control it so it can 
go back words too.


Motor is 4 wire bipolar. 

Thanks for your time.

code:

from bbio import *

pin1 = GPIO1_6
pin2 = GPIO1_7
pin3 = GPIO1_2
pin4 = GPIO1_3

pinMode(pin1, OUTPUT)
pinMode(pin2, OUTPUT)
pinMode(pin3, OUTPUT)
pinMode(pin4, OUTPUT)


# Create a setup function:
def setup():
  # Set the two LEDs as outputs:
  digitalWrite(pin1, LOW)
  digitalWrite(pin2, HIGH)
  digitalWrite(pin3, LOW)
  digitalWrite(pin4, HIGH)


def loop():
  toggle(pin1)
  toggle(pin2)
  toggle(pin3)
  toggle(pin4)
  delay(20)

# Start the loop:
run(setup,loop)


-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to