A device for sensing and balance augmentation using functional electrical stimulation