Skip to content

Send commands to an Art-Net node (DMX512, Stage Lighting)

License

Notifications You must be signed in to change notification settings

sparks-alec/artnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

artnet

NPM version

This is a Node.js module that can be used to send commands to an Art-Net node.

Usage

connect, set channel 1 to 255, disconnect.

var artnet = require('artnet');

artnet.connect('172.16.23.15');

artnet.set(1, 255, function () {
    artnet.close();
});

The set method can set multiple channels at once:

Use an array to set subsequent channels...

// set channel 100 to 10, channel 101 to 20 and channel 102 to 30
artnet.set(100, [10, 20, 30]); 

...or use an object to set multiple channels.

// set channel 100 to 255 and channel 200 to 127
artnet.set({100: 255, 200: 127}); 

Methods

  • connect( host, port, universe, interval )

    • port (default 6454)
    • universe (default 0)
    • interval (if a number >= 50 is set, data will be send to the Art-Net node in given microsecond intervals)
  • set( )

    • set( number channel, number value, function callback )
    • set( number channel, array values, function callback )
    • set( object channelvalues, function callback )

if callback is set to boolean false data will only be written to the internal buffer without sending. This makes sense if you wanna make sure that multiple set commands are sent simultaneously or if you're using the interval option.

  • send( callback )
    sends buffered data to the Art-Net node. callback is called with no arguments.

  • close( )
    closes the connection

Further Reading

License

Copyright (c) 2014 hobbyquaker [email protected]

MIT License

Credits

Art-Net™ Designed by and Copyright Artistic Licence Holdings Ltd.

About

Send commands to an Art-Net node (DMX512, Stage Lighting)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%