Using BMP280 sensor to control servos. Need some guidance with coding

Hi @mikami2020

Using the Adafruit library, If you replace the line:

if(Serial.print(F("Approx altitude >= -14.5"))) {

with

if (bmp.readAltitude(1013.25) > -14.5) {

Do your servos now react when the threshold is exceeded?

1 Like