How to use UPS HAT via driver

How to use UPS HAT via driver

  • Upgrade software:
sudo apt-get update 
sudo apt-get upgrade
  • Enable the I2C function via raspi-config tool.

via raspi-config tool...

  • install python-smbus
$sudo apt-get install python-smbus
  • Install wiringPi
git clone https://github.com/WiringPi/WiringPi
cd wiringPi
./build
unzip Rpi-ups-hat.zip
cd rpi-ups-hat
  • Run the sample program
sudo python example.py