| ||||||
This module provides simple functions to control the device vibration feature of some devices.
Turns the vibration off. If the device is not vibrating, the call is ignored.
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() |