Skip to content

Commit 28b09ef

Browse files
author
Thomas Preston
committed
made the readme example clearer
1 parent 9c5c6a2 commit 28b09ef

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@ Works without root (sudo) if you have the right permissions
99

1010
import pigpio
1111

12-
# configure GPIO18 pin for output
13-
pigpio.setup(18, pigpio.OUT)
14-
# configure GPIO5 pin for input
15-
pigpio.setup(5, pigpio.IN)
12+
pigpio.setup(18, pigpio.OUT) # configure GPIO18 pin for output
13+
pigpio.setup(5, pigpio.IN) # configure GPIO5 pin for input
1614

17-
# set GPIO18 pin high
18-
pigpio.output(18, True)
15+
pigpio.output(18, True) # set GPIO18 pin high
16+
pigpio.output(18, False) # set GPIO18 pin low
1917

20-
# set GPIO18 pin low
21-
pigpio.output(18, False)
22-
23-
# set GPIO5 pin high
24-
print(pigpio.input(5))
18+
print(pigpio.input(5)) # read GPIO5

0 commit comments

Comments
 (0)