Centrado / z-blockly-tracker

0 stars 0 forks source link

centraduino -BMP #363

Open Maharajacentrado opened 1 year ago

Maharajacentrado commented 1 year ago
  <img width="151" alt="image" src="https://user-images.githubusercontent.com/104857726/171138783-a4d54e82-853c-4130-a84b-44b7e6e25efe.png">

include

Adafruit_BMP280 bmp;

void setup() {

bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,
Adafruit_BMP280::SAMPLING_X2,
Adafruit_BMP280::SAMPLING_X16,
Adafruit_BMP280::FILTER_X16,
Adafruit_BMP280::STANDBY_MS_500);

void loop() {

bmp.readTemperature(); // for the dropdown temperature

bmp.readPressure()/100; // for the dropdown pressure

bmp.readAltitude(1019.66); // for the dropdown Altitude
}

Originally posted by @Maharajacentrado in https://github.com/kreativhut/z-blockly-tracker/discussions/92#discussioncomment-2854370

Maharajacentrado commented 1 year ago

If I click the drop down temperature then the code for pressure is appearing. if I choose the dropdown pressure then the code for temperature is appearing,

also remove the comments in the native code under void setup it throws an error while uploading,

Maharajacentrado commented 1 year ago

add the library for the BMP sensor https://github.com/adafruit/Adafruit_BMP280_Library.git

Maharajacentrado commented 1 year ago

pls check the code