Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update quickstart example in README.md #57

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ Hue_plus can easily be integrated into existing software. The entire codebase is

```
import serial
import hue_plus
from hue_plus import hue

ser = serial.Serial(args.port, 256000)
hue_plus.fixed(ser, 0, 0, 'FF0000') # First argument is ser, second is whether to bring up GUI (0=no), third is channel (0=both) and last is the color
hue.fixed(ser, 0, 0, 'FF0000') # First argument is ser, second is whether to bring up GUI (0=no), third is channel (0=both) and last is the color
```

### Common args
Expand Down
10 changes: 5 additions & 5 deletions hue_plus/hue.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def breathing(ser, gui, channel, color, speed):
for i in range(gui):
color.append(picker.pick("Color "+str(i+1) + " of "+str(gui)))

command = create_command(ser, channel, color, "breathing", 0, 0, 0, speed)
command = create_command(ser, channel, [color], "breathing", 0, 0, 0, speed)

outputs = previous.get_colors(channel, command)
write(ser, outputs)
Expand All @@ -447,7 +447,7 @@ def fading(ser, gui, channel, color, speed):
for i in range(gui):
color.append(picker.pick("Color "+str(i+1) + " of "+str(gui)))

command = create_command(ser, channel, color, "fading", 0, 0, 0, speed)
command = create_command(ser, channel, [color], "fading", 0, 0, 0, speed)

outputs = previous.get_colors(channel, command)
write(ser, outputs)
Expand All @@ -472,7 +472,7 @@ def cover_marquee(ser, gui, channel, color, speed, direction):
for i in range(gui):
color.append(picker.pick("Color "+str(i+1) + " of "+str(gui)))

command = create_command(ser, channel, color, "cover_marquee", direction, 0, 0, speed)
command = create_command(ser, channel, [color], "cover_marquee", direction, 0, 0, speed)
outputs = previous.get_colors(channel, command)
write(ser, outputs)

Expand All @@ -484,7 +484,7 @@ def pulse(ser, gui, channel, color, speed):
for i in range(gui):
color.append(picker.pick("Color "+str(i+1) + " of "+str(gui)))

command = create_command(ser, channel, color, "pulse", 0, 0, 0, speed)
command = create_command(ser, channel, [color], "pulse", 0, 0, 0, speed)
outputs = previous.get_colors(channel, command)
write(ser, outputs)

Expand All @@ -510,7 +510,7 @@ def alternating(ser, gui, channel, color, speed, size, moving, direction):
else:
option = 0

command = create_command(ser, channel, color, "alternating", direction, option, size, speed)
command = create_command(ser, channel, [color], "alternating", direction, option, size, speed)
outputs = previous.get_colors(channel, command)
write(ser, outputs)

Expand Down