Implementing Sequence

Hello,


I am working on a personal project and have gotten the following (pertinent) variables from my Apple watch:


totalAcceleration

Xrotation


What I want to implement is the following:


If totalAcceleration > acceleration_THRESHOLD:

Wait 3 seconds


total_Xrotation = 0


For the next 5 seconds:

total_Xrotation += Xrotation


If total_Xrotation > rotation_THRESHOLD:

Activate watch vibration



I am mainly unsure how to implement the timing rules.


I come from a mainly non OOP background (Python mainly), so any assistance is much appreciated!

Implementing Sequence
 
 
Q