Drain batteries through an LM324 controlled CEB6030L from a defunct graphics card
Dependencies: mbed FastAnalogIn PID mbed-rtos
Diff: main.cpp
- Revision:
- 7:3061a3da1c97
- Parent:
- 5:7112e564d33a
diff -r 232a402c9616 -r 3061a3da1c97 main.cpp --- a/main.cpp Tue Jul 05 20:48:30 2016 +0000 +++ b/main.cpp Sat May 16 11:16:47 2020 +0000 @@ -57,7 +57,8 @@ while (true) { Thread::wait(100); while (pc.readable()) { - pc.getc(); + int d = pc.getc(); + pc.printf("Increasing current: %d\r\n", d); I = I + 0.1; } } @@ -112,7 +113,7 @@ //pc.printf("Iset %f Iget %8d %f %f", Iset.read(), Iget.read_u16(), Iin(Iget.read()), (float)iget); //pc.printf(" Vbat %8d %f %f %f charge %f\r", Vbat.read_u16(), Vin(Vbat.read()), (float)vbat, (float)vbat_rest, charge); if (active) - pc.printf("%-8.2f\t%f\t%f\t%f\t%f\t%f\r\n", (T.read_us()/10000)/100.0, (float)vbat, (float)vbat_rest, (float)Iset.read(), (float)iget, charge); + pc.printf("%-8.2f \t%f \t%f \t%f \t%f \t%f\r\n", (T.read_us()/10000)/100.0, (float)vbat, (float)vbat_rest, (float)Iset.read(), (float)iget, charge); Thread::wait(1000); } }