diff --git a/setup.py b/setup.py index 8346d4b..9fb0372 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,12 @@ setup( name='Shush', - version='0.1dev', + version='0.1.0', packages=find_packages(), license='GNU General Public License v3.0', long_description=open('README.md').read(), + install_requires=[ + 'spidev', + 'RPi.GPIO', + ] ) diff --git a/shush/boards/shush_mk1.py b/shush/boards/shush_mk1.py index 9eda221..dcdd2e1 100644 --- a/shush/boards/shush_mk1.py +++ b/shush/boards/shush_mk1.py @@ -5,23 +5,31 @@ # TODO: Update these values once the PCB is designed. # Any other pin definitions neede? +# m | mod | cs# | BCM +# 0 | 1 | 0 | 8 +# 1 | 2 | 3 | 24 +# 2 | 3 | 1 | 7 +# 3 | 4 | 4 | 23 +# 4 | 5 | 2 | 25 +# 5 | 6 | 5 | 18 + m0_cs = 8 m0_enable = 2 # Need to update these as the board is developed. # Numbers are only placeholders -m1_cs = 7 +m1_cs = 24 m1_enable = 3 -m2_cs = 1 +m2_cs = 7 m2_enable = 4 -m3_cs = 12 +m3_cs = 23 m3_enable = 17 -m4_cs = 16 +m4_cs = 25 m4_enable = 27 -m5_cs = 20 +m5_cs = 18 m5_enable = 22 diff --git a/test_all_motors.py b/test_all_motors.py new file mode 100644 index 0000000..2893871 --- /dev/null +++ b/test_all_motors.py @@ -0,0 +1,29 @@ +import shush as s +import time + +m0 = s.Motor(0) +m1 = s.Motor(1) +m2 = s.Motor(2) +m3 = s.Motor(3) +m4 = s.Motor(4) +m5 = s.Motor(5) + +while True: + m0.move_velocity(0, 10000) + time.sleep(2) + m0.stop_motor() + m1.move_velocity(0, 10000) + time.sleep(2) + m1.stop_motor() + m2.move_velocity(0, 10000) + time.sleep(2) + m2.stop_motor() + m3.move_velocity(0, 10000) + time.sleep(2) + m3.stop_motor() + m4.move_velocity(0, 10000) + time.sleep(2) + m4.stop_motor() + m5.move_velocity(0, 10000) + time.sleep(2) + m5.stop_motor()