Websites Navigation: Airbit | Shop | m-shell.net
Languages: EN | DE

Module vibra: Vibration Control

  
Compatibility of module vibra
Nokia phones before Symbian 8[10]Internal Error

This module provides simple functions to control the device vibration feature of some devices.

vibra.off

• function off() → null

Turns the vibration off. If the device is not vibrating, the call is ignored.

vibra.on

• function on(duration=0) → null

Turns the vibration on for the specified duration (in milliseconds). If duration=0, vibration is turned on until vibra.off is called.

This function returns immediately, before the specified time has passed.

Throws ExcValueOutOfRange if the duration is outside the valid range (0 to 65535).

// vibrate for one second:
vibra.on(1000)
// another way to vibrate for one second:
vibra.on();
sleep(1000);
vibra.off()


© 2004-2011 airbit AG, CH-8008 Zürich
Document AB-M-LIB-888
mShell Home  > Documentation  > Manuals