05-25-2020 23:50
05-25-2020 23:50
Hi, two question here but both on the same topic. Developing a clock-face where the vibration occurs on the hour and vibrates the hour value e.g. vibrates 5 times for 5 o'clock and so on. However; the vibration only performs a single time, repeating of the vibration never happens. Is there a requirement to put in a delay or check on the vibration returned value.
Example below (for example 5 o'clock)
for(let i = 0 ; i < 5; i++) {
vibration.start("Bump",1,45,1);
//vibration.stop();
}
Having read the, excellent forum entry reply from JonFitbit, the name seems to work, but not sure about the other settings, for example the repeat, time, strength and ramp.
https://community.fitbit.com/t5/SDK-Development/Haptics-documentation/td-p/2863953
thanks all.
05-25-2020 23:57
05-25-2020 23:57
You're basically restarting the vibration within milliseconds of the previous vibration.Javascript doesn't wait until the previous vibration has finished before proceeding.
Try using a setInterval().
08-25-2021 06:13