How to use UPS HAT via driver

From Geekworm Wiki
Revision as of 20:18, 21 June 2019 by Admin (talk | contribs) (→‎How to use UPS HAT via driver)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
cd wiringPi
./build
# wget http://www.raspberrypiwiki.com/download/ups-hat/rpi-ups-hat.zip
unzip Rpi-ups-hat.zip
cd rpi-ups-hat
  • Run the sample program
sudo python example.py