A system for rehabilitation includes an electronic device comprising a memory device for storing instructions, a network interface card, and a sensor. The system for rehabilitation further includes a processing device operatively coupled to the memory device, the network interface card, and the sensor. The processing device is configured to execute the instructions to determine a plurality of angles, wherein the plurality of angles comprises at least one of the following: angles of extension of a first body part of a user extended away from a second body part of the user at a joint, and angles of bend of the first body part retracting closer toward the second body part. The processing device is further configured to execute the instructions to transmit the plurality of angles to a computing device controlling an electromechanical device, via the network interface card.