Modify LEDBorg code example to work with Python2

See #127
This commit is contained in:
Andrew Scheller 2016-10-19 14:36:52 +01:00 committed by GitHub
parent bd4a3228e5
commit baed45f3b5
1 changed files with 3 additions and 3 deletions

View File

@ -50,15 +50,15 @@ lb = LedBorg()
while True:
r, g, b = 0, 0, 0
for i in range(100):
r = i / 100
r = i / 100.0
lb.value = (r, g, b)
sleep(0.01)
for i in range(100):
g = i / 100
g = i / 100.0
sleep(0.01)
lb.value = (r, g, b)
for i in range(100):
b = i / 100
b = i / 100.0
lb.value = (r, g, b)
sleep(0.01)
```