We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bdb50b7 + 18c63cb commit cd47073Copy full SHA for cd47073
CircuitPython_Templates/max17048/code.py
@@ -0,0 +1,15 @@
1
+# SPDX-FileCopyrightText: Copyright (c) 2023 Kattni Rembor for Adafruit Industries
2
+#
3
+# SPDX-License-Identifier: Unlicense
4
+
5
+import time
6
+import board
7
+import adafruit_max1704x
8
9
+monitor = adafruit_max1704x.MAX17048(board.I2C())
10
11
+while True:
12
+ print(f"Battery voltage: {monitor.cell_voltage:.2f} Volts")
13
+ print(f"Battery percentage: {monitor.cell_percent:.1f} %")
14
+ print("")
15
+ time.sleep(1)
0 commit comments