Amir Chaudhary
/
Hexmodal-firmware_v3-1_hex_w_3d_14
Implemented LED Indicator Patterns
Diff: app/main.cpp
- Revision:
- 28:eca152c69c9b
- Parent:
- 27:f024c8c51c6e
- Child:
- 29:ca6caa47ef38
--- a/app/main.cpp Thu Apr 25 15:41:02 2019 +0000 +++ b/app/main.cpp Thu Apr 25 15:47:00 2019 +0000 @@ -1198,7 +1198,9 @@ float battery_reading = BAT_PIN.read()*3300*2; // pc.printf("VBAT= %d", (int)battery_reading); - if((battery_reading < 2000)||(battery_reading > 4450)) // set max voltage 4.55V + // Setting min value 2.0V so if relay button is pressed without battery Green LED will be OFF. + //Set max value 4.45V as this voltage is seen at the battery pin. + if((battery_reading < 2000)||(battery_reading > 4450)) { BatteryLowFlag = true; }