UPS Hat is a 5v power supply, It fit at the top of the raspberry pi, it gives power backup, while raspberry pi's USB power is cut off. It has various protections like short circuit protection, reverse battery protection and indicator, overcharge/discharge protection, and over current protection. It has a 5V USB output, convenient for powering other boards.
This code basically just searches for lines that start with "Revision" (the original code) or "CPU revision" (current /proc/cpuinfo output) and uses whichever one is present to determine the bus ID to use.
Fixes issue #1.
This code basically just searches for lines that start with "Revision" (the original code) or "CPU revision" (current
/proc/cpuinfo
output) and uses whichever one is present to determine the bus ID to use.