-
Notifications
You must be signed in to change notification settings - Fork 0
Serial
Harpo edited this page Oct 2, 2019
·
1 revision
Using the Serial interface is possible, but more prone to lost packets and message errors due to the heavy use of interrupts. The Serial connection only becomes stable at sufficiently slow baud rates ( <= 1200 ).
Example using packet.py:
import packet
packet.send(PROGRAM, R, G, B, SPEED)
# prints message if received
All values sent should be from 0 to 255.
SPEED is an optional global speed control value that affects most functions
COLOR is {R, G, B}
PROGRAM is the effect selector. The following programs are set by default:
- [0-24] wash(COLOR)
- [25-50] cylon(COLOR)
- [51-75] cylonColor(COLOR)
- [76-101] rain(COLOR)
- [102-126] rainbow(COLOR)
- [127-152] glitter(COLOR)
- [153-177] glitterCOLOR(COLOR)
- [178-203] glitterRandom(COLOR)
- [204-228] chaser(COLOR)
- [229-255] progress(PROGRESS, BED, EXTRUDER)
The progress function exists for use with the octoprint plugin for 3D printer status functionality.