📘 CodingMarble Learn

Online Digital Weather Station

A digital weather station has sensors (temperature, wind, rain), a small board that reads them as numbers, a wifi link that sends the numbers to a cloud server, and a web page that shows them to anyone. The path is: sense, read, send, store, show.

🎬 Step-by-step story

  1. This is a weather station: a pole with parts on it. It is not running yet.
  2. Three sensors do the measuring. One reads temperature, one reads wind, one reads rain.
  3. The sensor signals go to a small board. The board turns each signal into a number.
  4. The board sends the numbers by wifi to a computer far away. We call it the cloud.
  5. The cloud keeps the numbers. A web page reads them and shows them, so anyone can look.
  6. Free play: move the temperature slider. See the thermometer and the page bar change together.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Is the board the same as the sensor?

No. The sensor feels the weather. The board reads the sensor and makes a number.

Why does the data go to the cloud and not straight to the page?

The cloud keeps it so anyone can open the page at any time, even when the board is busy.

Who can see the page?

Anyone with the link, because it is on the internet.

What if I change the temperature?

The thermometer and the page bar change together, because the page shows what the sensor sends.

What is an online digital weather station?

A weather station is a set of tools that measure the weather. A digital one gives numbers, not a needle. An online one also sends those numbers over the internet.

Why do this? Many people can see the weather of one place, and the numbers are saved to compare day by day.

Sensor data collection

A sensor is a part that feels one thing and gives a signal. A weather station uses:

A small board (a tiny computer, for example an Arduino or ESP32) reads each signal many times a minute and keeps it as a number. Reading again and again is called sampling. Place sensors in the shade, away from walls, so the numbers are true.

Sending the data

The board joins the internet through wifi. It sends a small message such as temperature 28, wind 4, rain 0. The message goes to a server, a computer that is always on. This server is often called the cloud. The server saves each message with its time.

If wifi stops, a good board keeps the numbers and sends them later.

Online display

A web page asks the server for the newest numbers and draws them as big digits, a gauge or a line chart. It can refresh every minute. Good displays use clear units, a time stamp, and colours that tell hot from cold.

Rule: the page only shows what the sensors sent. If a sensor is wrong, the page is wrong too, so check it against a normal thermometer.

Try it: build a paper weather station,Try it: बनाएँ कागज़ का मौसम केंद्र,<p>Take a thermometer, a paper cup and a ruler. Put the thermometer in the shade at 9 am, 12 noon and 4 pm and write the three numbers in a table. First predict which time is hottest, then check. Draw a line chart. This is what the board and web page do for you.</p>,<p>एक थर्मामीटर, काग़ज़ का कप और स्केल लें। थर्मामीटर को छाया में सुबह 9, दोपहर 12 और शाम 4 बजे रखकर तीन संख्याएँ तालिका में लिखें। पहले अनुमान लगाएँ कि कब सबसे गर्म होगा, फिर जाँचें। रेखा-चार्ट बनाएँ। यही काम बोर्ड और वेब पेज आपके लिए करते हैं।</p>

undefined

Key formulas and definitions

Worked examples

1. List the four jobs of a weather station in order.

Sense (sensors measure), Read (the board makes numbers), Send (wifi to the cloud), Show (web page).

2. A board reads temperature 26, 28, 30 °C in three minutes. What average does the page show?

Sum = 26 + 28 + 30 = 84. Average = 84 ÷ 3 = 28 °C.

3. The page shows 80 °C in a school yard. What do you check first?

The sensor. 80 °C is not possible for air outside. Maybe the sensor sits in direct sun, or a wire is loose. Compare with a normal thermometer.

Common mistakes

Practice quiz

1. Which part turns a signal into a number?
2. What does the wind sensor use to measure speed?
3. Where does the board send the numbers?
4. What is rain measured in?
5. Why add a time stamp?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

Do I need to code to build one?

Yes, a little. A short program on the board reads each sensor and sends the numbers. Block coding can do it too.

Is the cloud a real cloud?

No. It is just another computer, far away, that is always on and keeps your data.

How often should the station send data?

Once a minute is enough for weather. Faster uses more power and gives almost the same numbers.

Where this is taught

China八年级(初二)Cross-disciplinary theme: Internet-smart design

Learn first

Learn next

Related lessons

All Computer Science lessons