![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
all bms comunicating with nucleo board and balancing
Dependencies: CANnucleo LTC68041 mbed
Fork of BMS_2 by
Diff: main.cpp
- Revision:
- 18:22977a898fe9
- Parent:
- 17:18d4d0ff26a6
- Child:
- 19:872e304d7e17
--- a/main.cpp Wed Aug 10 18:30:01 2016 +0000 +++ b/main.cpp Thu Aug 11 12:07:34 2016 +0000 @@ -13,7 +13,7 @@ * * The same code is used for both NUCLEO boards, but: * For board #1 compile the example without any change. - * For board #2 comment out line 26 before compiling + * For board #2 comment out line 23 before compiling * * Once the binaries have been downloaded to the boards reset board #1. * @@ -42,9 +42,6 @@ #include "mbed.h" #include "CANnucleo.h" -DigitalOut led(LED1); -int ledState; -Timer timer; /* * To avaoid name collision with the CAN and CANMessage classes built into the mbed library * the CANnucleo's CAN and CANMessage classes have been moved into the CANnucleo namespace. @@ -53,6 +50,9 @@ CANnucleo::CAN can(PA_11, PA_12); // CAN Rx pin name, CAN Tx pin name CANnucleo::CANMessage rxMsg; CANnucleo::CANMessage txMsg; +DigitalOut led(LED1); +int ledState; +Timer timer; int counter = 0; volatile bool msgAvailable = false;