Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7be1bb3

Browse files
committed
lets tell them the example is new
1 parent a7c23d9 commit 7be1bb3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

‎README.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Major changes:
1010
- Small changes in the arduino.py file
1111
- Added examples
1212

13-
Here follows the original README:
13+
Here follows the original README (with updated example):
1414

1515
> &copy; 2009-2010 Akash Manohar J <akash@akash.im>
1616
> under the MIT License
@@ -48,21 +48,21 @@ without having to repeatedly load the program to the Arduino board.
4848

4949
## Usage example
5050

51-
from arduino import Arduino
52-
import time
51+
from arduino import Arduino
52+
import time
5353

54-
b = Arduino('/dev/ttyUSB0')
55-
pin = 9
54+
b = Arduino('/dev/ttyUSB0')
55+
pin = 9
5656

57-
#declare output pins as a list/tuple
58-
b.output([pin])
57+
#declare output pins as a list/tuple
58+
b.output([pin])
5959

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)
6767

68-
b.close()
68+
b.close()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /