Mini Yoga Coach

Mini Yoga Coach

A Calliope mini coach which reacts to motion.

Easy

30 mins

from 8 years on

Story

Description of the device
Here a little helper for yoga exercises shall be programmed by using the acceleration sensor.
While the participant is performing a yoga figure, the participant holds the mini in one of his hands. If the participant does not concentrate and does not maintain his body tension, the RGB LED lights up red and the loudspeaker produces a deep sound.
The aim should be for the participant to hold the Calliope quietly in his hand for 20 seconds. When the calliope is quiet, the RGB LED lights up green. After 20 s with a steady hand, a high-pitched tone sounds.

Functionality
At two different times, the acceleration sensor queries data. Then the amount of the difference of the acceleration data is calculated.
It is to be assumed that there is no movement as long as the difference equals zero. However, the acceleration sensor reacts to the smallest vibrations. It is therefore recommended to set a tolerance threshold value in order to set a coarser sensitivity of the sensor. The threshold value can be set using the buttons.

You can find the finished file below.

The program can be opened directly with the MakeCode editor.

hex