![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
working code of bae with i2c
Fork of all_combined_week6 by
HK.h@4:79b97f9cab00, 2014-07-12 (annotated)
- Committer:
- greenroshks
- Date:
- Sat Jul 12 07:26:06 2014 +0000
- Revision:
- 4:79b97f9cab00
- Child:
- 6:82153349cc9b
Version (may be) final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
greenroshks | 4:79b97f9cab00 | 1 | #include "mbed.h" |
greenroshks | 4:79b97f9cab00 | 2 | #define tstart -40 |
greenroshks | 4:79b97f9cab00 | 3 | #define tstep 8 |
greenroshks | 4:79b97f9cab00 | 4 | #define vstart 3.3 |
greenroshks | 4:79b97f9cab00 | 5 | #define vstep 0.84667 |
greenroshks | 4:79b97f9cab00 | 6 | #define cstart 0.0691 |
greenroshks | 4:79b97f9cab00 | 7 | #define cstep 0.09133 |
greenroshks | 4:79b97f9cab00 | 8 | #define rsens 0.095 |
greenroshks | 4:79b97f9cab00 | 9 | |
greenroshks | 4:79b97f9cab00 | 10 | |
greenroshks | 4:79b97f9cab00 | 11 | |
greenroshks | 4:79b97f9cab00 | 12 | struct SensorData { |
greenroshks | 4:79b97f9cab00 | 13 | char Voltage[10]; |
greenroshks | 4:79b97f9cab00 | 14 | char Current[10]; |
greenroshks | 4:79b97f9cab00 | 15 | char Temperature[10]; |
greenroshks | 4:79b97f9cab00 | 16 | //float Battery[2]; |
greenroshks | 4:79b97f9cab00 | 17 | }; |
greenroshks | 4:79b97f9cab00 | 18 | |
greenroshks | 4:79b97f9cab00 | 19 | typedef struct ShortBeacon { |
greenroshks | 4:79b97f9cab00 | 20 | char Voltage[1]; |
greenroshks | 4:79b97f9cab00 | 21 | char AngularSpeed[2]; |
greenroshks | 4:79b97f9cab00 | 22 | char SubsystemStatus[1]; |
greenroshks | 4:79b97f9cab00 | 23 | char Temp[3]; |
greenroshks | 4:79b97f9cab00 | 24 | char ErrorFlag[1]; |
greenroshks | 4:79b97f9cab00 | 25 | }ShortBeacy; |
greenroshks | 4:79b97f9cab00 | 26 | |
greenroshks | 4:79b97f9cab00 | 27 | |
greenroshks | 4:79b97f9cab00 | 28 | void FUNC_HK_MAIN(); |
greenroshks | 4:79b97f9cab00 | 29 | |
greenroshks | 4:79b97f9cab00 | 30 | int quantiz(float start,float step,float x); |
greenroshks | 4:79b97f9cab00 | 31 | |
greenroshks | 4:79b97f9cab00 | 32 |