I am brand new to coding and i am trying to get my DPS310 sensor to work with my inventr.io HERO board (arduino UNO). I am also using a 128x64 OLED display. I believe the specific name for the display is U8G2_SH1106_128X64_NONAME_F_HW_I2C. I am using the simple test provided within the Sensor library, however i have added a few things along the way because the original code wasn't working either. With my current code I can verify the code without any compiling errors, but in my serial monitor it's telling me that my board is not connected even though i'm pretty sure its hooked up correctly. I could use some help with figuring out why the sensor isn't being found as well as how I could get it to display on my screen.
#include <U8g2lib.h>
#include <MUIU8g2.h>
#include <U8x8lib.h>
#include <Adafruit_DPS310.h>
Adafruit_DPS310 dps;
U8G2_SH1106_128X64_NONAME_F_HW_I2C screen(U8G2_R0, /* reset=*/U8X8_PIN_NONE);
#define DPS310_I2CADDR_DEFAULT (0x77)
// Can also use SPI!
#define DPS310_CS 10
void setup() {
Serial.begin(115200);
bool begin_I2C(uint8_t i2c_addr = DPS310_I2CADDR_DEFAULT,
TwoWire *wire = &Wire);
while (!Serial) delay(10);
Serial.println("DPS310");
if (!dps.begin_I2C(0x77)) { // Can pass in I2C address here
//if (! dps.begin_SPI(DPS310_CS)) { // If you want to use SPI
Serial.println("Failed to find DPS");
while (1) yield();
}
Serial.println("DPS OK!");
dps.configurePressure(DPS310_64HZ, DPS310_64SAMPLES);
dps.configureTemperature(DPS310_64HZ, DPS310_64SAMPLES);
}
void loop() {
sensors_event_t temp_event, pressure_event;
while (!dps.temperatureAvailable() || !dps.pressureAvailable()) {
return; // wait until there's something to read
}
dps.getEvents(&temp_event, &pressure_event);
Serial.print(F("Temperature = "));
Serial.print(temp_event.temperature);
Serial.println(" *C");
Serial.print(F("Pressure = "));
Serial.print(pressure_event.pressure);
Serial.println(" hPa");
Serial.println();
do {
screen.clearBuffer();
screen.setCursor(0, 20);
screen.print("T: ");
screen.print(temp_event.temperature);
screen.print(" *C");
screen.setCursor(0, 20);
screen.print("Pressure = ");
screen.print(pressure_event.pressure);
screen.print(" hPa");
} while (screen.nextPage());
screen.sendBuffer();
}
The following is how I have the components hooked up.

