if possible I would like to request
vibratemodule - would be nice for games etc.
It's relatively easy to trigger a simple vibration using
ctypes, but there's no API to control the duration, intensity etc.
import ctypes import time c = ctypes.CDLL(None) def vibrate(): p = c.AudioServicesPlaySystemSound p.restype, p.argtypes = None, [ctypes.c_int32] vibrate_id = 0x00000fff p(vibrate_id) if __name__ == '__main__': for i in xrange(3): vibrate() time.sleep(0.5)
Sweet! That's perfect for my use case.
Is this now easier with
Pure c calls are basically the same with or without objc. Since the vibrate api is pure c, and not part of an objc class, the code would be the same.
Ok, just wondering. Thanks.
@omz Thank you for your Vibrate module.
The process went successfully when done according to your instructions.
At a time such as when you are on the phone and the alarm goes off, can it vibrate for a long time?
Objective-C seems to write in this way.