i dont know how to do a barometer code, i tried, but isn´t working:
const { Altimeter, Board } = require("johnny-five");
const board = new Board();
board.on("ready", () => {
// By omitting the base elevation
property, the values
// received will be relative to your present elevation
const altimeter = new Altimeter({
controller: "BMP180"
});
altimeter.on("change", () => {
const {feet, meters} = altimeter;
console.log("Altimeter:");
console.log(" feet : ", feet);
console.log(" meters : ", meters);
console.log("--------------------------------------");
});
});
can somebody tell me what is wrong?
thank you, Stella_cefast
Post your complete code (using code tags), links to the actual module, and a wiring diagram. Tell us which Arduino you are using.
Please see "How to use this forum" for helpful suggestions.
Hello Stella_cefast,
Welcome to the forum.
Please read 'how to use this forum - please read' (there's a clue in the title) then go back and modify your original post.
Can somebody tell me what is wrong?
Arduino uses a computer language called C++, I don't know what language you are using but it possess only a passing resemblance to C++. You need to learn C++, there are plenty of examples on this web site and in the Arduino IDE.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
What model Arduino are you using?
Have you googled
arduino BMP180
Can you tell us your electronics, programming, arduino, hardware experience?
Thanks.. Tom... 