Skip to content

Commit f1b9acb

Browse files
committed
show RPi.GPIO version on info example
1 parent 37d3b15 commit f1b9acb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/python
22
import RPi.GPIO as GPIO
33

4+
print 'RPi.GPIO version: %s\n' %(GPIO.VERSION)
45
print 'Pi Board Information'
56
print '---------------------'
67
for key,val in GPIO.RPI_INFO.items():

test/info3.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/python3
2+
import RPi.GPIO as GPIO
3+
4+
print("RPi.GPIO version: %s\n" % GPIO.VERSION);
5+
print("Pi Board Information")
6+
print("--------------------")
7+
for key,val in GPIO.RPI_INFO.items():
8+
print("%s => %s" %(key,val));

0 commit comments

Comments
 (0)