Martijn Grootens / Mbed 2 deprecated heros_leg_readout

Dependencies:   AS5048 LCM101 MODSERIAL PinDetect SDFileSystem mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers constants.h Source File

constants.h

00001 #ifndef _CONSTANTS_HARDWARE_H_
00002 #define _CONSTANTS_HARDWARE_H_
00003 
00004 #include "mbed.h"
00005 
00006 #ifndef M_PI
00007 #define M_PI 3.14159265359f
00008 #endif
00009 
00010 // SPI Communication AS5048 joint encoders
00011 #define AS5048_MOSI         PTD6        // D11
00012 #define AS5048_MISO         PTD7        // D12
00013 #define AS5048_SCLK         PTD5        // D13
00014 #define AS5048_CS           PTD4        // D10
00015 
00016 // SPI Communication external SD CARD 
00017 #define SD_MOSI             PTC6        // D7
00018 #define SD_MISO             PTC7        
00019 #define SD_SCK              PTC5        
00020 #define SD_CS               PTC10       
00021 
00022 // LCM101-100 kgf S-beam force sensor
00023 #define LCM101              A3
00024 
00025 /**
00026  * Sensor settings and calibration data
00027  */
00028 namespace sensors {
00029     
00030     // LCM101-100kgf force sensor
00031     extern const float kLcm101Offset;
00032     extern const float kLcm101Factor;
00033     
00034     // AS5048 abs angle sensor chain
00035     extern const int kNumJoints;
00036 
00037     extern const char *kJointNames[];
00038     extern const float kOffsetsDegrees[];
00039     extern const bool kDirections[];
00040     
00041     
00042 }
00043 
00044 namespace timing {
00045     extern const int kTimeControlUs;                    // control loop
00046     extern const int kTimeLogDataUs;                    // data logging
00047     extern const int kTimeSerialPrintUs;                // serial printing
00048 
00049     extern const int kSerialBaudrate;
00050 }
00051 
00052 
00053 #endif