Other Commands
set_fun_mode
Enable or disable fun mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable
|
bool
|
Boolean or equivalent, enables (True) or disables (False) fun mode. |
False
|
Source code in src/pypixelcolor/commands/set_fun_mode.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
Examples:
# Enable fun mode
client.set_fun_mode(True)
# Disable fun mode
client.set_fun_mode(False)
pypixelcolor -a <MAC_ADDRESS> -c set_fun_mode true
set_pixel
Defines the color of a specific pixel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
int
|
X coordinate of the pixel (0-...). |
required |
y
|
int
|
Y coordinate of the pixel (0-...). |
required |
color
|
str
|
Color in hexadecimal format (e.g., 'FF0000' for red). |
required |
Source code in src/pypixelcolor/commands/set_fun_mode.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
Examples:
# Set pixel at coordinates (x=0, y=0) to red (#FF0000)
client.set_pixel(x=0, y=0, color="FF0000")
# Set pixel at coordinates (x=5, y=10) to green (#00FF00)
client.set_pixel(x=5, y=10, color="00FF00")
pypixelcolor -a <MAC_ADDRESS> -c set_pixel x=0 y=0 color=FF0000
set_rhythm_mode
Set the rhythm mode of the device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style
|
int
|
The style of the rhythm mode (0-4). |
0
|
l1
|
int
|
Level 1 (0-15). |
0
|
l2
|
int
|
Level 2 (0-15). |
0
|
l3
|
int
|
Level 3 (0-15). |
0
|
l4
|
int
|
Level 4 (0-15). |
0
|
l5
|
int
|
Level 5 (0-15). |
0
|
l6
|
int
|
Level 6 (0-15). |
0
|
l7
|
int
|
Level 7 (0-15). |
0
|
l8
|
int
|
Level 8 (0-15). |
0
|
l9
|
int
|
Level 9 (0-15). |
0
|
l10
|
int
|
Level 10 (0-15). |
0
|
l11
|
int
|
Level 11 (0-15). |
0
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/pypixelcolor/commands/set_rhythm_mode.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
Examples:
# Set rhythm equalizer style 1 with custom level heights (0-15)
client.set_rhythm_mode(
style=1,
l1=4, l2=8, l3=12, l4=15, l5=10,
l6=6, l7=3, l8=8, l9=12, l10=14, l11=5,
)
pypixelcolor -a <MAC_ADDRESS> -c set_rhythm_mode style=1 l1=4 l2=8 l3=12 l4=15 l5=10 l6=6 l7=3 l8=8 l9=12 l10=14 l11=5
set_rhythm_mode_2
Set the rhythm mode of the device (alternative version).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style
|
int
|
The style of the rhythm mode. Allowed values are 0 or 1. |
0
|
t
|
int
|
Animation time (0-7). |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
Byte sequence for the command payload used to set the rhythm mode. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/pypixelcolor/commands/set_rhythm_mode.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
Examples:
# Set alternative rhythm mode (style 0 or 1, animation time 0-7)
client.set_rhythm_mode_2(style=1, t=3)
pypixelcolor -a <MAC_ADDRESS> -c set_rhythm_mode_2 style=1 t=3
set_timer
Controls the timer (stopwatch) mode on the device.
Set timer action (start, pause, stop).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
Union[TimerAction, str, int]
|
TimerAction enum, string ('start', 'pause', 'stop'), or integer (0 = stop, 1 = start, 2 = pause). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SendPlan |
SendPlan
|
The single window send plan for this command. |
Source code in src/pypixelcolor/commands/set_timer.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
Examples:
from pypixelcolor import TimerAction
# Using Enum
client.set_timer(TimerAction.START)
client.set_timer(TimerAction.PAUSE)
client.set_timer(TimerAction.STOP)
# Using string names
client.set_timer("start")
client.set_timer("pause")
client.set_timer("stop")
pypixelcolor -a <MAC_ADDRESS> -c set_timer start
set_scores
Sets the scoreboard scores for player 1 and player 2 on supported devices.
Set scoreboard scores for player 1 and player 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
score_p1
|
Union[int, str]
|
Score for player 1 (0-99). Defaults to 0. |
0
|
score_p2
|
Union[int, str]
|
Score for player 2 (0-99). Defaults to 0. |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
SendPlan |
SendPlan
|
The single window send plan for this command. |
Source code in src/pypixelcolor/commands/set_scores.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
Examples:
# Set Player 1 to 24 and Player 2 to 18
client.set_scores(score_p1=24, score_p2=18)
pypixelcolor -a <MAC_ADDRESS> -c set_scores score_p1=24 score_p2=18