Nemanja Neskovic
/
BMS_LV_Test
bms lv
Diff: main.cpp
- Revision:
- 2:86cf05e531e6
- Parent:
- 1:a2d940c93002
--- a/main.cpp Mon Mar 25 23:21:03 2019 +0000 +++ b/main.cpp Mon Mar 25 23:29:10 2019 +0000 @@ -101,8 +101,14 @@ set_number_of_cells(4); while(1) { - for (int i=0;i<4;i++){ - readCellVoltage(i); - } + // print voltage of each cell starting from the one closest to the GND + pc.printf("The voltage of cell number %d is %.2f V\n",1,readCellVoltage(0)); + wait(1); + pc.printf("The voltage of cell number %d is %.2f V\n",2,readCellVoltage(1)); + wait(1); + pc.printf("The voltage of cell number %d is %.2f V\n",3,readCellVoltage(6)); + wait(1); + pc.printf("The voltage of cell number %d is %.2f V\n",4,readCellVoltage(7)); + wait(1); } }