File tree 1 file changed +15
-15
lines changed
1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Major changes:
10
10
- Small changes in the arduino.py file
11
11
- Added examples
12
12
13
- Here follows the original README:
13
+ Here follows the original README (with updated example) :
14
14
15
15
> © ; 2009-2010 Akash Manohar J < [email protected] >
16
16
> under the MIT License
@@ -48,21 +48,21 @@ without having to repeatedly load the program to the Arduino board.
48
48
49
49
## Usage example
50
50
51
- from arduino import Arduino
52
- import time
51
+ from arduino import Arduino
52
+ import time
53
53
54
- b = Arduino('/dev/ttyUSB0')
55
- pin = 9
54
+ b = Arduino('/dev/ttyUSB0')
55
+ pin = 9
56
56
57
- #declare output pins as a list/tuple
58
- b.output([pin])
57
+ #declare output pins as a list/tuple
58
+ b.output([pin])
59
59
60
- for xrange(10):
61
- b.setHigh(pin)
62
- time.sleep(1)
63
- print b.getState(pin)
64
- b.setLow(pin)
65
- print b.getState(pin)
66
- time.sleep(1)
60
+ for xrange(10):
61
+ b.setHigh(pin)
62
+ time.sleep(1)
63
+ print b.getState(pin)
64
+ b.setLow(pin)
65
+ print b.getState(pin)
66
+ time.sleep(1)
67
67
68
- b.close()
68
+ b.close()
You can’t perform that action at this time.
0 commit comments