Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: AS5048 LCM101 MODSERIAL PinDetect SDFileSystem mbed
bench.h
00001 #ifndef _BENCH02_H_ 00002 #define _BENCH02_H_ 00003 00004 #include "mbed.h" 00005 #include "as5048.h" 00006 #include "lcm101.h" 00007 #include "constants.h" 00008 00009 /** 00010 * Class to read out sensory information from the second test bench; 00011 * the upper and lower leg, foot en toe setup with 1-dof hinges, 00012 * each of which is equipped with an AMS AS5048 absolute rotary sensor. 00013 * The sensors are daisy chained and communicate via SPI 00014 */ 00015 class Bench { 00016 public: 00017 00018 static const float kCutOffDegrees = 180.0f; 00019 static const float kCutOffRadians = 3.14159265359f; 00020 00021 enum Joint { 00022 TOES, 00023 ANKLE, 00024 KNEE, 00025 HIP 00026 }; 00027 00028 Bench(PinName mosi, PinName miso, PinName sck, PinName cs, PinName p_lcm101); 00029 00030 void Update(); 00031 00032 float getDegrees(int i_joint); 00033 float getDegrees(Joint joint); 00034 00035 float getRadians(int i_joint); 00036 float getRadians(Joint joint); 00037 00038 00039 const char* getJointName(int i_joint); 00040 const char* getJointName(Joint joint); 00041 00042 float getForce(); 00043 00044 As5048* get_as5048(); 00045 00046 00047 private: 00048 As5048 as5048_; 00049 Lcm101 lcm101_; 00050 }; 00051 00052 #endif
Generated on Tue Jul 19 2022 01:08:55 by
1.7.2