mirror of
https://github.com/arendst/Tasmota.git
synced 2025-11-28 04:07:44 +00:00
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
# Generated Berry code from Animation DSL
|
|
# Source: rainbow_cycle.anim
|
|
#
|
|
# This file was automatically generated by compile_all_examples.sh
|
|
# Do not edit manually - changes will be overwritten
|
|
|
|
import animation
|
|
|
|
# Rainbow Cycle - Classic WLED effect
|
|
# Smooth rainbow colors cycling across the strip
|
|
#strip length 60
|
|
# Auto-generated strip initialization (using Tasmota configuration)
|
|
var engine = animation.init_strip()
|
|
|
|
var rainbow_palette_ = bytes("FFFF0000" "FFFF8000" "FFFFFF00" "FF00FF00" "FF0000FF" "FF8000FF" "FFFF00FF") # rainbow colors
|
|
# Create smooth rainbow cycle animation
|
|
var rainbow_cycle_ = animation.color_cycle(engine)
|
|
rainbow_cycle_.palette = rainbow_palette_
|
|
rainbow_cycle_.cycle_period = 5000 # cycle period
|
|
var rainbow_animation_ = animation.solid(engine)
|
|
rainbow_animation_.color = rainbow_cycle_
|
|
# Start the animation
|
|
engine.add(rainbow_animation_)
|
|
engine.run()
|
|
|
|
|
|
#- Original DSL source:
|
|
# Rainbow Cycle - Classic WLED effect
|
|
# Smooth rainbow colors cycling across the strip
|
|
|
|
#strip length 60
|
|
|
|
palette rainbow_palette = [0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00, 0x0000FF, 0x8000FF, 0xFF00FF] # rainbow colors
|
|
|
|
# Create smooth rainbow cycle animation
|
|
color rainbow_cycle = color_cycle(
|
|
palette=rainbow_palette
|
|
cycle_period=5s # cycle period
|
|
)
|
|
animation rainbow_animation = solid(color=rainbow_cycle)
|
|
|
|
# Start the animation
|
|
run rainbow_animation
|
|
-#
|