Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
)
18 changes: 13 additions & 5 deletions shush/boards/shush_mk1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
29 changes: 29 additions & 0 deletions test_all_motors.py
Original file line number Diff line number Diff line change
@@ -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()