-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for release (update all samples to the new interface, refine …
…readme)
- Loading branch information
Showing
11 changed files
with
73 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="apa102-pi", | ||
version="2.4.2", | ||
version="2.5.0", | ||
author="Martin Erzberger", | ||
author_email="[email protected]", | ||
description="Driver for APA102 LEDs on a Raspberry Pi", | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
"""Ultra simple sample on how to use the library. Light up the xmas tree in red""" | ||
from apa102_pi.driver import apa102 | ||
import time | ||
|
||
|
||
def main(): | ||
# Initialize the library and the strip. The xmas tree needs bitbang. Default order 'rgb' is fine. | ||
strip = apa102.APA102(num_led=25, bus_method='bitbang', mosi=12, sclk=25, global_brightness=31) | ||
|
||
# Clear the buffer | ||
strip.clear_strip() | ||
|
||
# Loop over all pixels snd set them to red | ||
for i in range(25): | ||
strip.set_pixel_rgb(i, 0xFF0000) # Red | ||
|
||
# Show the buffer, sleep 20 seconds | ||
strip.show() | ||
time.sleep(20) | ||
|
||
# Clear the strip and shut down | ||
strip.clear_strip() | ||
strip.cleanup() | ||
|
||
if __name__ == '__main__': | ||
main() |