Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
02ec65e7
Commit
02ec65e7
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
Another simple tool: Light LEDs in order
parent
61162a53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/chase.py
+15
-0
15 additions, 0 deletions
tools/chase.py
with
15 additions
and
0 deletions
tools/chase.py
0 → 100755
+
15
−
0
View file @
02ec65e7
#!/usr/bin/env python
# Light each LED in sequence, and repeat.
import
opc
,
time
numLEDs
=
512
client
=
opc
.
Client
(
'
localhost:7890
'
)
while
True
:
for
i
in
range
(
numLEDs
):
pixels
=
[
(
0
,
0
,
0
)
]
*
numLEDs
pixels
[
i
]
=
(
255
,
255
,
255
)
client
.
put_pixels
(
pixels
)
time
.
sleep
(
0.1
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment