over current protection
This commit is contained in:
@ -40,9 +40,9 @@ uint16_t stringToUInt8(String i, uint8_t index) {
|
||||
String MeasureCurrent::exec(String params) {
|
||||
int currentInVal = analogRead(CURRENT_IN);
|
||||
|
||||
int current = currentInVal;
|
||||
int current = ((double)currentInVal * U_UNIT) / R_SHUNT;
|
||||
|
||||
return String() + current;
|
||||
return String() + current + String("mA");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user