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
469df9cc
Commit
469df9cc
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
More tools, measuring-stick and strobe
parent
39d09765
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/measuring-stick.py
+19
-0
19 additions, 0 deletions
tools/measuring-stick.py
tools/strobe.py
+19
-0
19 additions, 0 deletions
tools/strobe.py
with
38 additions
and
0 deletions
tools/measuring-stick.py
0 → 100755
+
19
−
0
View file @
469df9cc
#!/usr/bin/env python
# Open Pixel Control version of the "measuring_stick" Arduino sketch:
# For each group of 64 LEDs (one strip), lights all LEDs with every
# multiple of 10 lit green.
import
opc
,
time
numStrings
=
8
client
=
opc
.
Client
(
'
localhost:7890
'
)
string
=
[
(
128
,
128
,
128
)
]
*
64
for
i
in
range
(
7
):
string
[
10
*
i
]
=
(
128
,
255
,
128
)
# Immediately display new frame
pixels
=
string
*
numStrings
client
.
put_pixels
(
pixels
)
client
.
put_pixels
(
pixels
)
This diff is collapsed.
Click to expand it.
tools/strobe.py
0 → 100755
+
19
−
0
View file @
469df9cc
#!/usr/bin/env python
# Open Pixel Control client: All lights to solid white
import
opc
,
time
numLEDs
=
512
client
=
opc
.
Client
(
'
localhost:7890
'
)
black
=
[
(
0
,
0
,
0
)
]
*
numLEDs
white
=
[
(
255
,
255
,
255
)
]
*
numLEDs
while
True
:
for
i
in
range
(
10
):
if
i
==
0
:
client
.
put_pixels
(
white
)
else
:
client
.
put_pixels
(
black
)
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