Seli MOD503 Скачать руководство пользователя страница 7

 print "******************"
 print "Voltage:%5.2fV" % readVoltage(bus)

 print "Battery:%5i%%" % readCapacity(bus)

 if readCapacity(bus) == 100:

         print "Battery FULL"

 if readCapacity(bus) < 20:

         print "Battery LOW"
 print "******************"
 time.sleep(2)

Create a new Bat.py file, and then run the command in the terminal:

sudo python Bat.py

Now you get the battery power percentage and battery voltage information.

FAQ

Содержание MOD503

Страница 1: ...5 Introduction Designed for Jetson Nano Developer Kit this advanced uninterruptible Power supply UPS module provides up to 5 1V 8000mA backup power for Jetson Nano board With intelligent power managem...

Страница 2: ...utomatic startup complete shutdown from software advanced power path management I2C bus communication and onboard LED indicators for monitoring battery capacity It is powered by six 18650 batteries Sp...

Страница 3: ...s the button turn on press and hold the button for at least 3 seconds turn off Power loss or power adapter fault detection LED and GPIO indication On board XH2 54 power output connector for powering o...

Страница 4: ...Electricity Electricity The number of LED lights on 0 25 1 26 50 2 51 75 3 76 100 4 Connect with Jetson Nano by 10Pin Correctly install six 18650 batteries to the Jetson Nano UPS power board and conne...

Страница 5: ...to turn off the UPS short press once to turn on the UPS Battery power and voltage can be read by software 1 First install the pip of Python3 on the Ubuntu system Please run the following command as t...

Страница 6: ...ng battery voltage and battery percentage usr bin env python import struct import smbus import sys import time def readVoltage bus address 0x36 read bus read_word_data address 2 swapped struct unpack...

Страница 7: ...y bus if readCapacity bus 100 print Battery FULL if readCapacity bus 20 print Battery LOW print time sleep 2 Create a new Bat py file and then run the command in the terminal sudo python Bat py Now yo...

Отзывы: