Code Functions:
Parses data from the anemometer and I2C sensors
Prints data to the terminal
Graphs the data in a web dashboard using HTML and Flask
Sends the data to serial port ttyUSB1 on the raspberry pi to be sent to the computer on the ground via LoRa (long range) radio waves
The orange box indicates the components that are housed within the electronics enclosure.
The anemometer and I2C sensors are both located outside the enclosure to record accurate measurements.
To enable sending data live without the need for a wifi connection, LoRa communication was set up by flashing two LoRa Heltec boards with sender and receiver code. Then, the LoRa sender board is connected to the raspberry pi via micro-USB to USB-A port to get sensor data, then it sends data to the receiver board, connected to and powered by the ground computer. The receiver LoRa board data is parsed through a LabView VI and displayed on the LabView UI which shows humidity, temperature, pressure, wind speed and direction, and altitude graphs. The data from the sensors are logged to a local csv file on the raspberry pi to be accessed later.
In addition, the raspberry pi is programmed to run the python code on startup (upon powering the pi), so data logging begins instantaneously, without the need for a wifi connection to SSH into the pi to run the logging code. To turn off the pi, one would still need to use SSH to run the shutdown command. Future work would be to add a button to turn off the pi, or use a pi with an on/off switch so it could run fully without wifi. As of now, one can keep the pi plugged in to power until reaching an area that one can SSH into the pi to run the shutdown command.