May-11-2023, 07:02 PM
Is there a reason why you wouldn't make five DHT22Module objects and call them in order?
modules = {pin: DHT22Module(pin) for pin in (2, 3, 4, 17, 27)} for pin, module in modules.items(): print(pin, module.get_sensor_readings()I would remove the prints inside the DHT22Module class (lines 13-19)