We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa0a792 commit b6bd43dCopy full SHA for b6bd43d
Adafruit_I2C/Adafruit_I2C.py
@@ -13,11 +13,12 @@ def getPiRevision():
13
"Gets the version number of the Raspberry Pi board"
14
# Courtesy quick2wire-python-api
15
# https://github.com/quick2wire/quick2wire-python-api
16
+ # Updated revision info from: http://elinux.org/RPi_HardwareHistory#Board_Revision_History
17
try:
18
with open('/proc/cpuinfo','r') as f:
19
for line in f:
20
if line.startswith('Revision'):
- return 1 if line.rstrip()[-1] in ['1','2'] else 2
21
+ return 1 if line.rstrip()[-1] in ['2','3'] else 2
22
except:
23
return 0
24
0 commit comments