Pebble Foundation Classes  0.2.0
C++ for Pebble
Vibes

Controlling the vibration motor. More...

Collaboration diagram for Vibes:

Classes

struct  VibePattern
 

Functions

void vibes_cancel (void)
 
void vibes_short_pulse (void)
 Makes the watch emit one short vibration.
 
void vibes_long_pulse (void)
 Makes the watch emit one long vibration.
 
void vibes_double_pulse (void)
 
void vibes_enqueue_custom_pattern (VibePattern pattern)
 

Detailed Description

Controlling the vibration motor.

The Vibes API provides calls that let you control Pebble’s vibration motor.

The vibration motor can be used as a visceral mechanism for giving immediate feedback to the user. You can use it to highlight important moments in games, or to draw the attention of the user. However, you should use the vibration feature sparingly, because sustained use will rapidly deplete Pebble’s battery, and vibrating Pebble too much and too often can become annoying for users.

Note
When using these calls, if there is an ongoing vibration, calling any of the functions to emit (another) vibration will have no effect.

Function Documentation

◆ vibes_cancel()

void vibes_cancel ( void  )

Cancel any in-flight vibe patterns; this is a no-op if there is no on-going vibe.

◆ vibes_double_pulse()

void vibes_double_pulse ( void  )

Makes the watch emit two brief vibrations.

◆ vibes_enqueue_custom_pattern()

void vibes_enqueue_custom_pattern ( VibePattern  pattern)

Makes the watch emit a ‘custom’ vibration pattern.

Parameters
patternAn arbitrary vibration pattern
See also
VibePattern