SparkFun IoT Redboard ESP32


#define BLYNK_TEMPLATE_ID “TMPL6BudvxtrA”
#define BLYNK_TEMPLATE_NAME “Study of IAQ SPARKFUN”
#define BLYNK_AUTH_TOKEN “HmODGoojQZ9cBtnqUBypH_J8XaXkZmWx”

#define BLYNK_PRINT Serial
#include <SPI.h>
#include<WiFiNINA.h>
#include<BlynkSimpleWiFiNINA.h>

char ssid = “AdreMirah”;
char pass = “adreana2002”;

#include <Wire.h>
#include “SparkFunBME280.h”

BME280 mySensor;

void setup()
{
Serial.begin(115200);
Serial.println(“Reading basic values from BME280”);

Wire.begin(23, 22); //SDA, SCL for ESP32
//The ESP32 supports different pins for the I2C interface

if (mySensor.beginI2C() == false) //Begin communication over I2C
{
Serial.println(“The sensor did not respond. Please check wiring.”);
while(1); //Freeze
}
}

void loop()
{
Serial.print(“Temperature: “);
Serial.print(mySensor.readTempF(), 2);
Serial.println(” degrees F”);

Serial.print(“Pressure: “);
Serial.print(mySensor.readFloatPressure(), 2);
Serial.println(” Pa”);

Serial.print("Altitude: ");
Serial.print(mySensor.readFloatAltitudeMeters(), 2);
Serial.println(“m”);

Serial.print(“%RH: “);
Serial.print(mySensor.readFloatHumidity(), 2);
Serial.println(” %”);

Serial.println();
delay(1000);
} Can anyone help me check if the code for IOT sensor is correct as we need to connect to Blynk and do we need to installed any libraries ?

1 Like

i am trying to do something similar as well

Have you gotten the basic examples for each working first? Hook up just the screen and get its to begin outputting AVR-Based Serial Enabled LCDs Hookup Guide - SparkFun Learn

Then I’d move on to do the same for the IAQ sensor https://docs.sparkfun.com/SparkFun_Indoor_Air_Quality_Sensor-SCD41-SEN55/software_setup/

Then move on to getting both to work at once over serial, and finally integrate the whole shebang into your Blynk