Shenzhen I/O Wiki

◀ Back to conceptMAIL

Transcript[]

Before Completion[]

Jie Pollution sensing window

From: 张杰 <zhangjie@longteng-co-ltd.gd.cn>

I am working on a smart window that reacts to particulate matter in the air (pollution). I need a controller that allows us to close the window when the level is too high and opens it again when the level is lower.

Jie.

After Completion[]

Jie Re: Pollution sensing window

From: 张杰 <zhangjie@longteng-co-ltd.gd.cn>

Good. By the way, maybe you noticed that this is a “sliding window algorithm” for a sliding window. Do you think that is funny?

Jie.

Description[]

  • sensor is a simple input connected to an air pollution sensor.
  • window is a simple output connected to a motor that opens and closes a sliding window.
  • The window should be closed (signal low) when the average sensor reading for the 8 most recent time units (including the current) is greater than or equal to 50.