-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temperature sensor #21
Comments
You can almost take the code directly from that example. You just need to pull out the code that happens inside of the var temperature = new five.Thermometer({
controller: "TMP36",
pin: "A0"
});
temperature.on("change", function() {
console.log(this.celsius + "°C", this.fahrenheit + "°F");
}); If you want to have the data passed along in your flow, you can do something like this instead of just console logging: var temperature = new five.Thermometer({
controller: "TMP36",
pin: "A0"
});
temperature.on("change", function() {
node.send({
topic: 'temperature',
celsius: this.celsius,
fahrenheit: this.fahrenheit
});
}); |
always that easy if you know how.. Thanks a lot. |
This could be a bug, any chance you can try that example outside of node-red and with johnny-five directly and compare the values? |
Is there more documentation about how to use the nodes?
I want to use a tmp36 sensor with johnny five within node-red on raspberry pi with an attached arduino.
Which node should I use? GPIO node gives me input but I don't know how to use the johnny five stuff then. (https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-tmp36.md)
With the johnny five node I can't get it to work because I don't really understand how.
The led blink example works.
Can someone give me a hint?
The text was updated successfully, but these errors were encountered: