A wearable respiratory biofeedback system based on body sensor networks