Skip to content

Commit 40b616d

Browse files
committed
add gpio control
1 parent 918568f commit 40b616d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test_test.py
1212

1313
.DS_Store
1414
.history
15+
*.bat
1516
.VSCodeCounter
1617
.vscode/.ropeproject/config.py
1718
.vscode/.ropeproject/objectdb

pymycobot/mycobot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def gpio_output(self, pin, v):
175175
v: Output value(int), 1 - GPIO.HEIGH, 0 - GPIO.LOW
176176
"""
177177
self.gpio.setup(pin, self.gpio.OUT)
178-
self.gpio.setup(pin, v)
178+
self.gpio.output(pin, v)
179179

180180
# Other
181181
def wait(self, t):

0 commit comments

Comments
 (0)