Complete the code to import the library needed to read sensor data.
import [1]
The gpiozero library is used to interact with sensors on Raspberry Pi.
Complete the code to create a temperature sensor object on GPIO pin 4.
sensor = gpiozero.TemperatureSensor([1])GPIO pin 4 is commonly used for temperature sensors in examples.
Fix the error in the code to read the current temperature value.
current_temp = sensor.[1]The value property gives the current sensor reading directly.
Fill both blanks to create a dictionary with sensor name and its current value.
sensor_data = [1]: [2]
The dictionary key is the sensor name as a string, and the value is the current reading from sensor.value.
Fill all three blanks to create a dashboard update function that prints sensor data with a label.
def update_dashboard(): print(f"[1]: [2] °C") return [3]
The function prints the label 'Temperature' and the current sensor value, then returns None as it only outputs data.