rijk_meurs
Published © LGPL

IoT Weather Station

Weather station that display temperature, humidity and pressure on your Android phone with Blynk IoT server.

BeginnerShowcase (no instructions)8,164
IoT Weather Station

Things used in this project

Hardware components

Arduino Nano 33 IoT
Arduino Nano 33 IoT
×1
Humidity and Temperature Sensor
Adafruit Humidity and Temperature Sensor
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Blynk
Blynk

Story

Read more

Custom parts and enclosures

weather station bb

because there is no Arduino nano 33 iot in the Fritzing library I used the standard nano, the connections are the same.

Schematics

weather station bb

because there is no Arduino nano 33 iot in the Fritzing library I used the standard nano, the connections are the same.

Code

weather station code

C/C++
/***************************************************************************
written by Rijk Meurs 16-05-2020
hardware: Arduino nana 33 iot, BME280 sensor
iot     : Blynk
 ***************************************************************************/
#define BLYNK_PRINT Serial
#include <Wire.h>
#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "ikZEcrON32ZTQoS4ZcTjq3pM7DTy8pzY";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "your ssid";
char pass[] = "your password";

Adafruit_BME280 bme; // I2C

float t;
float h;
float p;

BlynkTimer timer;

void sendSensor()
{
t = bme.readTemperature();
h = bme.readHumidity();
p = bme.readPressure();
Blynk.virtualWrite(V5, t);
Blynk.virtualWrite(V6, h);
Blynk.virtualWrite(V7, p / 100.0F);

void setup() {
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);

  Serial.println("BME280 test");

  if (!bme.begin()) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
  }
   timer.setInterval(3000,sendSensor);
}

void loop() {
// read the sensors and append to the string:

    Blynk.run();
    timer.run();
}

Credits

rijk_meurs

rijk_meurs

1 project • 1 follower

Comments

Add projectSign up / Login