Hallo Leute,
ich finde den Fehler nicht.
Sagt mir mal bitte, was ich hier falsch gemacht habe.
Der ausgegebene Wert ändert sich nicht, selbst wenn ich die Kabel abziehe.
Das Altimeter ist so eines, wie das MS5607.
/* Arduino Nano Pin "A5" -> MS5611 Pin "SCL"
* Arduino Nano Pin "A4" -> MS5611 Pin "SDA"
* Arduino Nano Pin "3.3V" -> MS5611 Pin "VIN"
* Arduino Nano Pin "GND" -> MS5611 Pin "GND"
*/
// *** Altimeter section ***
#include <IntersemaBaro.h>
Intersema::BaroPressure_MS5607B baro(true);
long pressureInPascal;
long altitudeInCentimeters;
void setup() {
// *** Altimeter section ***
Serial.begin(9600);
baro.init();
}
void loop() {
altitudeInCentimeters = static_cast<uint32_t>(baro.getHeightCentiMeters()); // value: 984206 off
pressureInPascal = static_cast<uint32_t>(baro.getPressure()); // value: 0 -10000
Serial.println(pressureInPascal);
Serial.println(altitudeInCentimeters);
delay(2000);
}