CQ_KIT_Ver1_5
Dependencies: mbed RateLimiter BLDCmotorDriverCQ_KIT_Ver1_5
Diff: main.cpp
- Revision:
- 10:5fbe1476624c
- Parent:
- 9:25961e94de0e
- Child:
- 11:0120619cdfb7
--- a/main.cpp Tue Oct 18 11:09:44 2016 +0000 +++ b/main.cpp Wed Oct 19 09:30:46 2016 +0000 @@ -35,13 +35,11 @@ ); // Pin to check temperature on the X-NUCLEO-IHM07M1 board -AnalogIn temperature(PC_2); +AnalogIn temperature(P_TEMP); void checkTemperature() { - float t = temperature.read()* 100.0f; - - if (temperature.read() > 0.55f){ + if (temperature > 0.55f){ printf("Overheating... Turning off now\n\r"); M.setDutyCycle(0); M.coast();