0
0
IOT Protocolsdevops~30 mins

Edge gateway architecture in IOT Protocols - Mini Project: Build & Apply

Choose your learning style9 modes available
Edge Gateway Architecture Setup
📖 Scenario: You are working on an IoT project where multiple sensors send data to an edge gateway. The edge gateway collects this data, filters it, and then forwards only important information to the cloud. This helps reduce network traffic and speeds up response times.
🎯 Goal: Build a simple edge gateway data processor that stores sensor readings, sets a threshold to filter important data, filters the data based on this threshold, and finally outputs the filtered data ready to be sent to the cloud.
📋 What You'll Learn
Create a dictionary called sensor_data with exact sensor names and their readings
Add a variable called threshold with the exact value 50
Use a dictionary comprehension called filtered_data to keep only sensors with readings above the threshold
Print the filtered_data dictionary to show the filtered sensor readings
💡 Why This Matters
🌍 Real World
Edge gateways collect and filter data from many IoT sensors before sending only important information to the cloud. This reduces network load and speeds up decision-making.
💼 Career
Understanding edge gateway data filtering is key for IoT engineers and DevOps professionals working with distributed sensor networks and cloud integration.
Progress0 / 4 steps
1
Create initial sensor data dictionary
Create a dictionary called sensor_data with these exact entries: 'temp_sensor': 45, 'humidity_sensor': 55, 'pressure_sensor': 48, 'light_sensor': 60
IOT Protocols
Need a hint?

Use curly braces {} to create the dictionary and separate each sensor and reading with a comma.

2
Add threshold value
Add a variable called threshold and set it to the integer value 50
IOT Protocols
Need a hint?

Just write threshold = 50 on a new line.

3
Filter sensor data using threshold
Use a dictionary comprehension to create a new dictionary called filtered_data that includes only sensors from sensor_data with readings greater than threshold
IOT Protocols
Need a hint?

Use {sensor: reading for sensor, reading in sensor_data.items() if reading > threshold} to filter.

4
Print filtered sensor data
Write a print statement to display the filtered_data dictionary
IOT Protocols
Need a hint?

Use print(filtered_data) to show the filtered sensors.