Category Archives: Arduino

Create a Simple Client Server Connection Over WiFi to Connect Arduino to Python on the PC

In this video lesson, we show how to create a simple Client/Server connection over WiFi. We connect the Arduino Uno R4 WiFi to Python running on the PC. The arduino is the server, and the PC Python program is the client. We show how to pass data from the PC to the Arduino, and then how to pass data from the Arduino back to the PC. With this simple framework, we can control Arduino projects from our desktop PC, and we can use the PC to display data being taken from the Arduino.

In this lesson we develop code for Arduino, and the code in Python. For your convenience, we present the code below.

On the Arduino Side, this is the code to create the ‘Server’.

You also need to add a tab to your program using the ‘Add Tab’ feature of the IDE. The program in the tab should be named secrets.h

Your secrets.h file should look like this:

You can run the program above, and it should connect to your WiFi, and should print out the Arduino’s IP address. Make note of the IP address as it will be needed in the Client program below. On the PC side, this is the python code to create the client:

 

Portable Arduino Weather Station Project

In this video lesson we show how to build a portable Arduino Weather Station. The station is powered by a battery bank, and data is displayed on the SSD1306 OLED display. The station included the BMP180 pressure sensor for barometric pressure, the DHT 11 for temperature and humidity, and a push button to toggle between modes. The schematic of the circuit is shown below.

Arduino Weather Station
Schematic of Arduino Weather Station

The code developed in the video is included for your convenience below:

 

Portable Arduino Barometric Weather Station

In this video lesson we take you through the project of building an Arduino Barometric Pressure Weather Station. It builds on the last two lessons in this series. We measure and display instantaneous Barometric Pressure, normalized to Sea Level. Then in the lower portion on the OLED SSD1306 display, we show a graph of the barometric pressure over the last 24 hours.

 

Arduino Altimeter
Schematic for the Portable Arduino Barometric Pressure Sensor

Below we include the code we develop in the above video. Make sure to set the ‘alt’ variable to your elevation at your location, in meters.

 

Plot any Data or Graph on any OLED

In this video I show you how you can easily plot any graph or data onto any OLED display. We create a mathematical function which will map the raw data onto the screen. We demonstrate the function with a sin wave, but the function will work with any equation or data. This is the code which we developed in the video.

 

Arduino Weather Barometer

In this video lesson we show how to build an Arduino based Weather Barometer.  We will use the BMP180 pressure sensor on the GY-87 module. This lesson will likely also work fine if you are just using the BMP180 directly. We show how to measure barometric pressure, convert it to Inches of Mercury, stabilize it with a low pass filter, and then normalize it to standard sea level pressure. With this, our values should very closely match what is being seen on weather maps. This is the schematic of the circuit we will be working on.

Arduino Altimeter
Schematic for the Portable Arduino Barometer

For your convenience, here is the code we developed in the video.