Browse Source

fixed CC display

Toby Chui 6 months ago
parent
commit
a8bca95443
1 changed files with 1 additions and 0 deletions
  1. 1 0
      firmware/pd-psu_v1/pd-psu_v1.ino

+ 1 - 0
firmware/pd-psu_v1/pd-psu_v1.ino

@@ -49,6 +49,7 @@ void loop() {
   //Read the analog reading of both pins
   voltageReading = analogRead(VOLTAGE_PIN);
   currentReading = analogRead(CURRENT_PIN);
+  isCCMode = !digitalRead(CCCV_PIN);
 
   //Convert them to actual voltage / current value
   voltageReading = map(voltageReading, 0, 255, 0, 500) * 4;  //30k - 10k voltage divider