Much more trivial way to do this. Take your google cardboard to your gym. No $$ or computer or arduino required. Not even a bicycle. Just use the accelerometer to measure how fast your bobbing up and down as you cycle. Increase the sensitivity as required. (Unless you're one of those master cyclists who can keep your head totally steady while cycling.)