Bonjour,
Je débute dans le développement WatchOS, j’essaye de faire détecter un mouvement a l’Apple Watch (comme boire un verre d’eau par exemple)
J’ai vu qu’on pouvais se baser sur le Gyroscope ou l’accéléromètre,
Mais impossible de trouver la bonne fonction a appeler.
Quelqu’un aurait-il une idée ?
Merci par avance,
Pierre.
Bonsoir,
Sans doute du côté de Core Motion ? As-tu regardé dans ce framework dans la documentation Xcode ?
Cordialement,
Nicolas
Core Motion reports motion- and environment-related data from the onboard hardware of iOS devices, including from the accelerometers and gyroscopes, and from the pedometer, magnetometer, and barometer. You use this framework to access hardware-generated data so that you can use it in your app. For example, a game might use accelerometer and gyroscope data to control onscreen game behavior.
Many services of this framework let you access both the raw values recorded by the hardware and a processed version of those values. Processed values do not include forms of bias that might adversely affect how you use that data. For example, a processed accelerometer value reflects only the acceleration caused by the user and not the acceleration caused by gravity.
1 « J'aime »
J’ai fais des recherches sur Core Motion, ça a l’air d’être ça mais c’est super compliqué a priori, il faut que j’approfondisse