100 likes | 496 Views
Weather Station. Bořek Tuleja. Introduction. The project that I chose and created is called Weather Station. It is able to measure weather data and display it. Functions: Measure temperature, pressure and humidity Calculate wind speed and wind direction
E N D
Weather Station Bořek Tuleja
Introduction The project that I chose and created is called Weather Station.It is able to measure weather data and display it. Functions: • Measure temperature, pressure and humidity • Calculate wind speed and wind direction • Show different measured data in periodical time intervals
Hardware analysis To program and connecteverythingtogether I usedanArduino Mega microcontroller. Wesolderedeverything on a PCB. It alsousestwoplasticpartswhichhelpus to calculatethe data aboutwind and alsophysically show it. List ofusedcomponents: • Arduino Mega2560 - microcontroller • BME280 - sensor • LCD display • SS411P (8x) – hallsensors
Software analysis TheArduinomicrocontrollerscanbenativelyprogrammed in C, I alsousedthislanguage to writethecode. Becausewe had no sensors to measurewind speed and direction I had to write my ownsolution. Layers of our code: • Initialization – setting up all the sensors and tasks, configuring pins • Main loop • Tasks – repeatedly executed part of the code • Finite state machine – controls the state of the program
The real time operating system Is a type of operating system which allows you to divide code into tasks and run them all „in the same time“. Tasks in my system contain a time information for the scheduler which says how often is a task called.The function which a task calls is a normal C/C++ function defined somewhere in the code and intasks it is stored as pointers. Scheduler provides all the job to manage tasks. Scheduler class: Task structure: All needed functions to manage tasks are defined here.
Sources: Station image - https://www.bunnings.com.au/holman-iweather-digital-weather-station_p3110644 Thankyou! Bořek Tuleja +420 732 601 900 tuleja.b@seznam.cz borek.tuleja@gmail.com