The Butterfly Launcher is a cool butterfly model launcher. Compared to the old version, the new launcher is equipped with a MEGA328 microprocessor, a lithium battery component, 18 colorful LEDs, and provides two expansion ports (for power and serial communication). In actual use, multiple devices can be connected in series and controlled independently.
Specification | Parameter |
---|---|
Battery Capacity | 120mA |
RGB LED | x 18 |
Communication Method | UART |
Net Weight | 68g |
Gross Weight | 68g |
Product Dimensions | 45 x 35 x 32mm |
Package Dimensions | 110 x 110 x 30mm |
Serial communication mechanism: When connecting multiple devices in series, to accurately send instructions to a specific device, we attach an "id" variable in the code. As the instruction is transmitted serially through the controller to the device, the variable decreases by one each time it passes a device. The device that reads the variable as 0 executes the command.
Therefore, 1, we can independently control any one of the serial devices and individually set their LED color, blinking mode, brightness, and servo status.
2, As shown in the video below, there is a certain delay when demonstrating the LED lights. Assuming each device has a 100ms delay and we have a total of 10 devices, the last device will have a 1s delay. To optimize this delay, we can program the first device to wait for the last device (due to the nature of the protocol, the delay is unavoidable).
Note:
Mega328 ISP download interface pin definition
Regarding the control program, we have encapsulated a special program block in UIFLow, allowing you to easily write control programs. Below is how to add a program block in UIFLow.