Player APIs (BrightScript & Ja...
JavaScript APIs
chardisplay
13min
the chardisplay object lets you set the properties of characters on a display chardisplay idl interface chardisplay { promise\<void> show(in unsigned long row, in unsigned long col, in domstring text) promise\<void> clear() promise\<void> setpos(in unsigned long row, in unsigned long col) promise\<void> setcursor(in unsigned long cursor) // 0=off, 1=blink, 2=underline, 3=both promise\<void> setcontrast(in unsigned long contrast) // 0 100 promise\<int> getcontrast() promise\<void> setbrightness(in unsigned long brightness) // 0 100 promise\<int> getbrightness() promise\<int> getcolumns() promise\<int> getrows() } object creation to create a chardisplay object, load the @brightsign/chardisplay module using the node js® require() method var chardisplayclass = require("@brightsign/chardisplay"); var chardisplay = new chardisplayclass(); chardisplay show() promise\<void> show(in unsigned long row, in unsigned long col, in domstring text) displays text at a prescribed position clear() promise\<void> clear() clears the display setpos() promise\<void> setpos(in unsigned long row, in unsigned long col) positions the cursor setcursor() promise\<void> setcursor(in unsigned long cursor) sets the cursor style 0 is off 1 is blink 2 is underline 3 is both setcontrast() promise\<void> setcontrast(in unsigned long contrast) set the display contrast in values from 0 to 100 getcontrast() promise\<void> getcontrast() gets the display contrast setbrightness() promise\<void> setbrightness(in unsigned long brightness) set the display brightness in values from 0 to 100 getbrightness() promise\<int> getbrightness() gets the display brightness getcolumns() promise\<int> getcolumns() returns the number of columns this is useful for writing code that loops over the available rows and columns getrows() promise\<int> getrows() returns the number of rows this is useful for writing code that loops over the available rows and columns