The P5_fin script (program) is the basic Arduino script which demonstrates all functions available:
- The speed of the vibration motor is controlled by movements.
- Movement data are sent to other body interaction boards.
- Vibration strength is adjusted when near by body interaction boards have different speed
How it works:
The P5_fin script reads data from the accelerometer. Depending of the measured motion the vibration motor is speed up or slowed down. (Slow motion = reduce vibration motor speed, fast motion = speed up).
When the measured motion changes the motion data are sent out and can be received by other BI1. At the same time this script listen to other body interaction boards which send their motion data to all listening nodes.
When the measured motion of other body interaction board are different from the motion measured by this script, the vibration motor is adjusted (speed up or slowed down). So two or more body interaction boards can influence each other and synchronize after some time. The documented script is available in codebender. In this how-to the uploading of the script is explained.