- #HOW TO CONNECT EASY WEATHER TO INTERNET HOW TO#
- #HOW TO CONNECT EASY WEATHER TO INTERNET SOFTWARE#
- #HOW TO CONNECT EASY WEATHER TO INTERNET CODE#
- #HOW TO CONNECT EASY WEATHER TO INTERNET FREE#
#HOW TO CONNECT EASY WEATHER TO INTERNET HOW TO#
(If you don't comment out Blink.begin(), without a valid connection to Blynk, the sketch will stop at or hang at that point.) In the next section, we will talk about Blynk, how to set it up both on the Arduino sketch and on the smartphone to display the weather station on the phone.īlynk is easy to install on your iPhone or Android and comes with detailed documentation: But there is so much information there and so many options that I found things a little confusing at first, so I will provide here my own version of how to get started with Blynk. Just comment out the Blynk.begin() line in Setup to get the weather station to run by itself.
#HOW TO CONNECT EASY WEATHER TO INTERNET SOFTWARE#
If you want a precise correction, there are tables online that will give you the exact correction for your elevation.Īt this point, you can set up the hardware, and use my attahed software to display weather data on the OLED display. The 1" Hg per 1000 feet is just a rough estimate. You will want to change this value to match your own elevation.
#HOW TO CONNECT EASY WEATHER TO INTERNET CODE#
In my own code attached, you will see I added 1.3 to compensate for my own elevation of 1300 ft. At higher elevations, barometric pressure obviously drops, so to correct values from the sensor to their equivalent reading at sea level, you must add in a value to the measured value of roughly 1 inch Hg for every 1000 feet of elevation. Note - barometric pressure is normally reported corrected to sea level. To get the graphs to work, Blynk obviously needed actual numbers. That worked fine to display the numbers, but failed totally when I added graphs. At first I sent Blynk the same string I was sending to the OLED. One little twist on this that gave me some grief was that Blynk is happy to display the data whether sent as a string or a number. So adding these two includes solved that problem: #include and #include This was necessary to convert the numbers coming out of the sensor into strings suitable to display on the OLED display. But Blynk does support WiFiNINA, which is used by the Nano 33 IoT and several other Arduino processors. You may want to experiment with each of these libraries separately to get a better understanding of each.īlynk has a bunch of examples of how to configure hardware to interface with it: Unfortunately, it doesn't list the Nano 33 IoT as one of its supported Arduino's. All three can be downloaded directly from Arduino's library manager. The libraries involved are the Adafruit_BME280_Library for the sensor, the ss_oled library for the display, and the Blynk library for Blynk. The software running on the Arduino is just a little more than a mash-up of the library examples for the sensor, the display and Blynk. That cable can go to your computer when programming or to a plug-in USB power supply when in use as a weather station. That way, it can be programmed or powered by a single cable coming out of the box. I attached everything inside the case with hot glue, but you might want to use epoxy instead if you are planning to put it outside in the summer heat. The sensor is attached so that it sits just inside that hole. It needs to be relatively weather-proof, but the sensor is exposed to the outside weather by a 1/2" hole at the bottom. It is plastic, as it needs to be transparent to RF for WiFi. The hardware is enclosed in a small plastic case with a clear front, so that the display can be viewed. (And yes, they are reversed - SDA is digital pin 5)) The display uses a secondary I2C port set up at digital pins 4 and 5. The sensor uses the normal default I2C port at analog pins 4 and 5. In theory, one I2C can support multiple devices, but the libraries of the sensor and display had some conflicts, so I ended up with two different I2C ports. Both the sensor and the display interface with I2C. The schematic below shows how the hardware is interconnected. But it makes it much easier to get everything up and running on the OLED display first, before dealing with Blynk and your smartphone. The display is obviously optional - the goal is to get the weather station displaying on your phone.
We use the Arduino Nano 33 IoT which handles WiFi, a BME280 sensor board with temperature, humidity and barometric pressure all in one unit, and a 1 inch OLED display. The hardware for this project is fairly simple.
#HOW TO CONNECT EASY WEATHER TO INTERNET FREE#
It is also free for hobbyists! So this is a relatively simple IoT project that allowed me to explore using Blynk. Not so with Blynk! It is really flexible, has a beautiful user interface, works with all kinds of IoT platforms, and runs on both Android and iPhone. I have tried a bunch of them and have usually been disappointed. There are a lot a apps out there that allow you to connect your smartphone to the Internet of Things.