Controlling the vibration motor.
The vibration motor can be used as a very visceral way of giving feedback to the user. It's great to highlight important moments in games, or to draw the attention of the user. However, developers should use the vibration feature sparingly, as sustained use will rapidly deplete Pebble’s battery, and vibing too much and too often can get annoying.
void vibes_cancel | ( | void | ) |
Cancel any in-flight vibe patterns; this is a no-op if there is no on-going vibe.
void vibes_double_pulse | ( | void | ) |
Makes the watch emit two brief vibrations.
void vibes_enqueue_custom_pattern | ( | VibePattern | pattern | ) |
Makes the watch emit a ‘custom’ vibration pattern.
pattern | An arbitrary vibration pattern |
void vibes_long_pulse | ( | void | ) |
Makes the watch emit one long vibration.
void vibes_short_pulse | ( | void | ) |
Makes the watch emit one short vibration.
struct VibePattern |
Data structure describing a vibration pattern.
A pattern consists of at least 1 vibe-on duration, optionally followed by alternating vibe-off + vibe-on durations. Each segment may have a different duration.
Example code:
Data Fields | ||
---|---|---|
const uint32_t * | durations |
Pointer to an array of segment durations, measured in milli-seconds. The maximum allowed duration is 10000ms. |
uint32_t | num_segments | The length of the array of durations. |