Created
August 2, 2015 05:11
-
-
Save bcardarella/dc4d52f713503d194edf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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