Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TODO: bbox testing // 2x structure BAUX_STRAND_COUNT1 = 1 BAUX_STRAND_LEN1 = 85 // 1x globe BAUX_STRAND_COUNT2 = 4 BAUX_STRAND_LEN2 = 60 BAUX_LED_COUNT1 = BAUX_STRAND_COUNT1 * BAUX_STRAND_LEN1 // 5*30 // 30/m BAUX_LED_COUNT2 = BAUX_STRAND_COUNT2 * BAUX_STRAND_LEN2 // 4*60 // 60/m DEFAULT_INTERVAL_MS = 2000 BAUX_STREAK_LENGTH = BAUX_LED_COUNT1 * 3 / 4 )
View Source
const ( LED_FREQ = 1200000 LED_COUNT = 300 FREEFORM_IDX = 188 TICK_DELAY = 6 // match sound to LEDs SINE_PERIOD = 5 )
View Source
const ( // TODO: bbox testing // 2x structure CRANE_STRAND_COUNT1 = 5 CRANE_STRAND_LEN1 = 30 // 1x heart CRANE_STRAND_COUNT2 = 4 CRANE_STRAND_LEN2 = 60 CRANE_LED_COUNT1 = CRANE_STRAND_COUNT1 * CRANE_STRAND_LEN1 // 10*30 // * 2x(10) // 30/m CRANE_LED_COUNT2 = CRANE_STRAND_COUNT2 * CRANE_STRAND_LEN2 // 8*60 // * 1x(4 + 4) // 60/m BPM = 36 INTERVAL = 60 * time.Second / BPM / 2 // (36 beats/min) / 2 color transitions/beat LIGHT_COUNT = 18 // 2 x 18 == 36 total trueWhite lights turned on at a time STREAK_LENGTH = 30 STREAK_STEP = 0.1 // TODO: unused? CRANE_COLOR_WEIGHT = 0.01 )
View Source
const ( // 2x undercarriage strands CRAWLER_STRAND_COUNT1 = 4 CRAWLER_STRAND_LEN1 = 60 CRAWLER_LED_COUNT1 = CRAWLER_STRAND_COUNT1 * CRAWLER_STRAND_LEN1 // 4*60 // * 2x(4) // 60/m // TODO: make transition time-based rather than fast as possible? // lower weight == slower transitions // crawler has fewer LEDs than fish == faster iterations CRAWLER_COLOR_WEIGHT = 0.005 )
View Source
const ( // 2x side fins STRAND_COUNT1 = 5 STRAND_LEN1 = 144 // 1x top and back fins STRAND_COUNT2 = 10 STRAND_LEN2 = 60 LED_COUNT1 = STRAND_COUNT1 * STRAND_LEN1 // 5*144 // * 2x(5) // 144/m LED_COUNT2 = STRAND_COUNT2 * STRAND_LEN2 // 10*60 // * 1x(4 + 2 + 4) // 60/m AMPLITUDE_FACTOR = 0.75 )
View Source
const ( DEFAULT_FREQ = 800000 GPIO_PIN1A = 18 // PWM0, must be 18 or 12 GPIO_PIN1B = 12 // PWM0, must be 18 or 12 GPIO_PIN2 = 13 // PWM1, must be 13 for rPI 3 BRIGHTNESS = 255 // 0-255 )
Variables ¶
View Source
var (
RED_LIGHT_RANGE = []uint32{0, 1, 2, 3, 4}
)
Functions ¶
Types ¶
type LedBeats ¶
type LedBeats struct {
// contains filtered or unexported fields
}
func InitLedBeats ¶
Click to show internal directories.
Click to hide internal directories.