0
0
Raspberry Piprogramming~20 mins

Real-time sensor dashboard in Raspberry Pi - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Real-time Sensor Dashboard Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🎯 Scenario
intermediate
2:00remaining
Identify the best data refresh strategy for a real-time sensor dashboard

You are building a dashboard on a Raspberry Pi to display temperature sensor data in real-time. The sensor updates every second. Which data refresh strategy ensures the dashboard shows the latest data without overloading the device?

ARefresh the entire dashboard every second by reloading all data and visuals.
BUse a streaming data connection to update only the temperature value every second.
CRefresh the dashboard once every minute to reduce CPU usage.
DManually refresh the dashboard only when the user clicks a button.
Attempts:
2 left
💡 Hint

Think about updating only what changes frequently to save resources.

dax_lod_result
intermediate
2:00remaining
Calculate average temperature over last 5 minutes using DAX

Given a sensor data table with columns Timestamp and Temperature, which DAX measure correctly calculates the average temperature for the last 5 minutes?

Raspberry Pi
AverageTempLast5Min = CALCULATE(AVERAGE(SensorData[Temperature]), FILTER(SensorData, SensorData[Timestamp] >= NOW() - TIME(0,5,0)))
AAverageTempLast5Min = CALCULATE(AVERAGE(SensorData[Temperature]), SensorData[Timestamp] > NOW() - 5)
BAverageTempLast5Min = AVERAGE(SensorData[Temperature]) WHERE SensorData[Timestamp] >= NOW() - TIME(0,5,0)
CAverageTempLast5Min = CALCULATE(AVERAGE(SensorData[Temperature]), FILTER(SensorData, SensorData[Timestamp] >= NOW() - TIME(0,5,0)))
DAverageTempLast5Min = AVERAGE(FILTER(SensorData, SensorData[Timestamp] >= NOW() - TIME(0,5,0))[Temperature])
Attempts:
2 left
💡 Hint

Use CALCULATE with FILTER and NOW() minus 5 minutes.

visualization
advanced
2:00remaining
Choose the best visualization for showing sensor temperature trends over time

You want to show how temperature changes every second over the last 10 minutes on your dashboard. Which visualization type is best for this purpose?

AA pie chart showing percentage of time temperature was in different ranges.
BA bar chart showing average temperature per minute.
CA scatter plot showing temperature vs humidity.
DA line chart showing temperature on Y-axis and time on X-axis.
Attempts:
2 left
💡 Hint

Think about showing continuous data over time.

🔧 Debug
advanced
2:00remaining
Identify the error in this DAX measure for latest sensor reading

Given this DAX measure to get the latest temperature reading:
LatestTemp = MAXX(FILTER(SensorData, SensorData[Timestamp] = MAX(SensorData[Timestamp])), SensorData[Temperature])
What is the problem with this measure?

AIt returns blank because MAX inside FILTER does not evaluate correctly in row context.
BIt returns the maximum temperature instead of the latest temperature.
CIt causes a circular dependency error because MAX is used inside FILTER on the same column.
DIt returns the latest timestamp but not the temperature value.
Attempts:
2 left
💡 Hint

Consider how MAX inside FILTER behaves in row context.

data_modeling
expert
3:00remaining
Design a data model for multiple sensors with real-time updates

You have multiple sensors sending temperature and humidity data every second. You want to build a dashboard on Raspberry Pi that shows each sensor's latest readings and historical trends. Which data model design is best?

AA table with SensorID and latest readings only, plus a separate archive table for historical data.
BSeparate tables per sensor, each with Timestamp, Temperature, Humidity columns; join them in the dashboard.
COne large table with columns: SensorID, Timestamp, Temperature, Humidity; update this table every second with new rows.
DStore all data in a single JSON file updated every second and parse it in the dashboard.
Attempts:
2 left
💡 Hint

Think about efficient queries for latest and historical data separately.