Prev: Module ui: User Interface Functions
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()
|
Next: Mathematics© 2004-2011 airbit AG, CH-8008 Zürich
Document AB-M-LIB-888