Hei,
Im stuck for some reason. Im playing around with Arduino board and I want to read the data in the client.
My server code is this:
if(Meteor.isServer) {
var five = Meteor.npmRequire("johnny-five");
var board = new five.Board();
Meteor.startup(function() {
board.on("ready", Meteor.bindEnvironment(function() {
var temperature = new five.Thermometer({
controller: 'TMP36',
pin: 'A0'
});
Meteor.setInterval(function() {
console.log(temperature.celsius);
}, 5000);
}))
})
}
I don’t want to save the data to collection but to read it online. How do I pass the variable temperature.celsius
from server to the client? I cannot run the code in the client since i’m using NPM require and it works only in the server.