Pebble.Vibes
Vibration motor controls.
Use built-in pulses for simple feedback, or pattern for custom rhythms. Each pattern value is a segment duration in milliseconds, alternating ON/OFF.
import Pebble.Vibes as Vibes
sos : Cmd msg
sos =
Vibes.pattern [ 100, 100, 100, 100, 100, 300, 300, 300, 100, 100, 100 ]
onTap : Cmd msg
onTap =
Vibes.shortPulse
For a runnable example, use the watch-demo-vibes project template in the IDE.
Native Pebble C API
- Vibes on developer.repebble.com
Commands
cancel
cancel : Cmd msgStop any in-progress vibration.
shortPulse
shortPulse : Cmd msgTrigger a short vibration pulse.
longPulse
longPulse : Cmd msgTrigger a long vibration pulse.
doublePulse
doublePulse : Cmd msgTrigger a double vibration pulse.
pattern
pattern : List Int -> Cmd msgPlay a custom vibration pattern.
Each value is a segment duration in milliseconds. Segments alternate ON/OFF starting with ON.