-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more comments around the custom backend file
- Loading branch information
1 parent
ad6bb6a
commit bdf7be0
Showing
5 changed files
with
51 additions
and
28 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 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 |
---|---|---|
@@ -1,7 +1,17 @@ | ||
# import some_led_library | ||
|
||
class Backend: | ||
|
||
def __init__(self, led_count): | ||
def __init__(self, led_count: int): | ||
# Remove the following line after you have implemented the set_led function! | ||
raise NotImplementedError("Could not load backend as it has not been implemented, go implement it!") | ||
|
||
def set_led(self, led_index: int, on: bool): | ||
# Write your code for controlling your LEDs here | ||
# It should turn on or off the led at the led_index depending on the "on" variable | ||
# For example: | ||
# if on: | ||
# some_led_library.set_led(led_index, (255, 255, 255)) | ||
# else: | ||
# some_led_library.set_led(led_index, (0, 0, 0)) | ||
pass |
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