Skip to content

Instantly share code, notes, and snippets.

@bcardarella
Created August 2, 2015 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcardarella/dc4d52f713503d194edf to your computer and use it in GitHub Desktop.
Save bcardarella/dc4d52f713503d194edf to your computer and use it in GitHub Desktop.
setInterval(function() {
var time = Date.now();
arduinos.forEach(function(arduino) {
// each "arduino" is an instance of an Arduino
// class that has a websocket connected to the
// actual corresponding Arduino hardware
arduino.send({currentTime: time});
});
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment