Skip to content

Commit 8a3f362

Browse files
authored
Merge pull request #27 from spencerhooks/patch-1
Updated Switch Usage example code
2 parents 42d5ed8 + 0f6e729 commit 8a3f362

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ Switch Usage
172172
SW_PIN = 8
173173
gpio = gaugette.gpio.GPIO()
174174
sw = gaugette.switch.Switch(gpio, SW_PIN)
175-
last_state = sw.state()
175+
last_state = sw.get_state()
176176
while True:
177-
state = sw.state()
177+
state = sw.get_state()
178178
if state != last_state:
179179
print "switch %d" % state
180180
last_state = state

0 commit comments

Comments
 (0)