simple beacon

community animation

 Loading animation...

Glowscript:

// DEVICE PARAMETERS (modify with care)

 

    // Elektra simulator

    device: name = 'simulator-elektra-20'

    device: type = 'sim'

    device: tickIntervalMillisecs = '50'     // increase to reduce CPU load.

    device: protocolVersion = '1.0'

    device: ledCount = '20'

    device: ramSpaceBytes = '25000'          // set an animation size limit in memory.

    device: romSpaceBytes = '200000'         // set an animation size limit on disk.

 

// DEFINES (modify as needed)

 

    // LED defines:

    define: innerLeds = '[1-4]'    // alias for inner-ring leds.

    define: outerLeds = '[5-12]'

    define: edgeLeds = '[13-20]'

    define: allLeds = '[1-20]'

 

    // Color defines:

    define: red = '(255,0,0,1)'

    define: green = '(0,255,0,1)'

    define: blue = '(0,0,255,1)'

    define: yellow = '(255,255,0,1)'

    define: white = '(250,250,250,1)'

    define: orange = '(255,165,0,1)'

    define: purple = '(255,0,255,1)'

    define: off = '(0,0,0,1)'

 

// CODE

 

// Continuously loops.

// Each loop cycle has a 1.5 second duration.

@start                             // mandatory entry-point function name.

    here: start_tag1               // set bookmark.

    glowImmediate: allLeds yellow  // set all LEDs to yellow.

    pause: 750ms                   // pause for 750 milliseconds.

    glowImmediate: allLeds off     // turn all LEDs off.

    pause: 750ms                   // pause for 750 milliseconds.

    goto: start_tag1               // loop back to bookmark.