Question: Q1: Upload a PDF with Python code to solving the following problem. In an embedded system, two streams of sensor readings come from two temperature
Q1: Upload a PDF with Python code to solving the following problem.
In an embedded system, two streams of sensor readings come from two temperature sensors installed on two different locations (backyard and front yard). Use random numbers to simulate the readings.
Print a report on the screen that shows the two the readings from the two locations and an alert when the readings are different by more than 5 degrees. This could be a sign one of the sensors is faulty. What percentage of time does this fault event get detected must also be shown.
The report must also show the average of the two locations.
To reduce the error from each location, use a 5-tap averaging window on each location. We did 3-tap in the videos for a single location. Extend it to 5-tap on two different locations.
Q2: Modify the first question to make the filter size variable by using lists. Instead of a 3-tap or 5-tap, the user can choose any odd number tap (e.g., 7 or 9). You must use arrays. Also, instead of averaging only, provide variable length median filtering. For example, if chosen by the function caller, then we can show the median of the last 7 values instead of the average of the last 7 values (assuming 7 is the chosen filter size).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
