Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

5 Commits

Repository files navigation

JavaScript consumer library for the Simple Device Drawing Protocol

API

TBD

Example: hello-world

newrequire('sddp-javascript-consumer')('sddp.ConsumerA','sddpExample',{host: '...',password: '...'}).connect(process.argv.pop()||'sddp.Display1').then((display)=>{display.clear()display.writeAt(3,0,'Hello')display.writeAt(4,1,'World!')consttimeStr=newDate().toLocaleTimeString()display.writeAt(20-timeStr.length,3,timeStr)display.disconnect()}).catch((err)=>{console.error('Connection failed:',err)process.exit(-1)})

A trace of the traffic generated by the execution of this script is shown here.

On an LCM2004A 4x20 character display, execution of the above would result in:

hello-world executed on an LCM2004A 4x20 character display (white text on blue background)

About

JavaScript (ES6) consumer library for the Simple Device Drawing Protocol

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages