Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Latest commit

 

History

History

scroller

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
layout title permalink machines styles
page
LED Scroller
/devices/leds/scroller/
id type name config
scrollLEDs
leds
LED Scroller
helvetica.json
_scrollLEDs _displayScroll .print .diags
position display float margin-right margin-bottom
relative;
inline-block;
left;
32px;
16px;
position
relative;
font-family
Monaco,"Lucida Console",monospace;
clear margin-bottom
both;
16px;

LED Scroller

This page demonstrates the ability of the LED device to create scrolling LED displays.

You can enter new messages in the Diagnostics window using the s command (eg, s Hello World!).

{% include machine.html id="scrollLEDs" config="json" %}

<textarea id="printScroll" class="print" cols="78" rows="16"></textarea>
Run Step Reset Clear Stopped

You may have noticed that the LED message set above ("Happy New Year!") also includes some special characters ("$c$30b$30o$30b$30o$90s") that aren't displayed. The $ symbol is used to embed "command codes" into a message.

Current command codes include:

  • $b (blank the display; turns all LEDs off)
  • $c (center the current display contents; ie, continue scrolling until centered)
  • $h (halt scrolling)
  • $o (turn the display on; the opposite of blank)
  • $p (pause scrolling)
  • $s (scroll the display without adding more symbols)

The default operation is to scroll the display, adding new symbols to the vacated end of the display as needed. When all symbols in the current message have been processed, processing returns to the beginning of the message.

To change the default operation at any point, insert one or more command codes into the string. Commands may also include a count immediately after the $ (e.g., $90s), which determines how many "steps" (cycles) that command should remain in effect before advancing to the next symbol (or command) in the message. So, for example, $90s will scroll the display 90 times (without adding new symbols) before continuing to the next symbol. The default count for an operation is 1.

For convenience, commands that don't need a count (e.g., $b and $o) automatically treat the count as a pause ($p). In other words, $30b is equivalent to $b$30p.

Finally, if you want to embed $ as a normal symbol, use two of them ($$).

More commands will be added over time. This was just an initial set to get the ball rolling -- or rather, to get it scrolling.