Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Commit

Permalink
Add charge mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Forairaaaaa committed Jun 8, 2022
1 parent e40fa90 commit 7f69a30
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Application/Bala2/Bala2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ void setup(){
calibration_mode = true;
}

if (M5.BtnC.isPressed()) {
M5.Lcd.setCursor(0, 0);
M5.Lcd.println("Charge mode");
while (1) {
if (M5.Power.isCharging()) {
M5.Lcd.println("Start charging...");
while(1) {
if (M5.Power.isChargeFull())
M5.Lcd.println("Charge completed!");
delay(5000);
}
}
delay(500);
}
}

calibrationGet(&x_offset, &y_offset, &z_offset, &angle_center);
Serial.printf("x: %d, y: %d, z:%d, angle: %.2f", x_offset, y_offset, z_offset, angle_center);

Expand Down

0 comments on commit 7f69a30

Please sign in to comment.