class Object

Constants

LOCATION

Public Instance Methods

lickPattern(controller) click to toggle source
# File examples/Vibrate.rb, line 25
def lickPattern(controller)
    controller.vibrateAll 0
    sleep 0.25
    controller.vibrateAll 0.5
    sleep 0.25
end
pattern1(controller) click to toggle source
# File examples/Vibrate.rb, line 3
def pattern1(controller)
    controller.vibrateAll(0.25)
    sleep (3)
    controller.vibrateAll(1)
    sleep (1)  
    controller.vibrateAll(0.3)
    sleep 2
    controller.vibrateAll 1
    sleep 2
    controller.vibrateAll 0.6
    sleep 5
    controller.vibrateAll 0.5
    sleep 0.5
    controller.vibrateAll 1
    sleep 20
end
pulsePattern(controller) click to toggle source
# File examples/Vibrate.rb, line 19
def pulsePattern(controller)
    controller.vibrateAll(0)
    sleep 0.5
    controller.vibrateAll(1)
    sleep 0.5
end
randomPattern(controller) click to toggle source
# File examples/Vibrate.rb, line 31
def randomPattern(controller)
    controller.vibrateAll(rand(0.0..1.0))   #Set our vibration somewhere in the range of valid numbers
    sleep(rand(5..60))                     #and sleep for a random period of time
end