Skip to content

Commit

Permalink
added a sublte shake
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgendreau committed Jul 17, 2018
1 parent 39d7fa5 commit 86358f6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
17 changes: 16 additions & 1 deletion motions.py
Expand Up @@ -40,7 +40,7 @@
robot = pypot.robot.from_config(spyder_config)


# raise NotImplementedError
# raise NotImplementedError
x = easeInOutSine
y = easeOutBack
linear = linearTween
Expand Down Expand Up @@ -348,6 +348,7 @@ def concur():
midpos = [
[robot.m1 , x, robot.m1.present_position, -4] ,
]

def shake():
easingMultiple(rightpos, .5)
easingMultiple(leftpos, .5)
Expand All @@ -359,6 +360,20 @@ def shake():

# easingMultiple(midpos, 1)

rightPosShort = [
[robot.m1 , x, robot.m1.present_position, -20] ,
]

leftPosShort = [
[robot.m1 , x, robot.m1.present_position, 10] ,
]

def subtleShake():
easingMultiple(rightPosShort, .45)
easingMultiple(leftPosShort, .35)
time.sleep(.05)
easingMultiple(midpos, .35)
print("done")

def nod():
print("down")
Expand Down
10 changes: 10 additions & 0 deletions subtleShake.py
@@ -0,0 +1,10 @@
import time
import math
import numpy

from easing import *
from motions import *
from Adafruit_Thermal import *

subtleShake()
time.sleep(.5)

0 comments on commit 86358f6

Please sign in to comment.