Dependencies: MITSUBA_CAN mbed
Revision 0:82bc2e2e9852, committed 2016-06-16
- Comitter:
- kelloo
- Date:
- Thu Jun 16 06:04:29 2016 +0000
- Commit message:
- CAN Logger
Changed in this revision
diff -r 000000000000 -r 82bc2e2e9852 MITSUBA_CAN.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MITSUBA_CAN.lib Thu Jun 16 06:04:29 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/kelloo/code/MITSUBA_CAN/#ec529582beed
diff -r 000000000000 -r 82bc2e2e9852 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 16 06:04:29 2016 +0000 @@ -0,0 +1,21 @@ + +#include "mbed.h" +#include "MITSUBA_CAN.h" + +CAN can(p30, p29); +MITSUBA canlog(can, 250000); + +int main(){ + + while(1) { + canlog.GetCanData(FRAME0); + // canlog.GetCanData(FRAME1); + + printf("voltage:%6.2f rpm:%.2f\n", canlog.batteryVoltage, canlog.rpmMotor); + printf("FETtemp: %.2f duty: %.2f angle: %.2f\n", canlog.FETtemp, canlog.duty, canlog.angle); + // printf("accel: %.2f\n", canlog.accelPosition); + printf("\n"); + + wait(1.0); + } +}
diff -r 000000000000 -r 82bc2e2e9852 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jun 16 06:04:29 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file