K Kapnula
👤
🎛
课程 4 · 年级 13+

Inputs: buttons and sensors — the board starts to feel

📖 课程 ──▶ 🎯 测验——选择翻译 ──▶ ✅ 本课已完成
4 × 5 = 20

Until now the board only "spoke" — now it "listens". Button: pinMode(2, INPUT_PULLUP) — built-in resistor, fewer wires; pressed = LOW. Sensors: photoresistor (light), DHT11/DHT22 (temperature+humidity, ~€3), HC-SR04 (ultrasonic distance), PIR (motion), DS18B20 (precise temperature). Analog sensors → analogRead gives 0–1023. The logic never changes: read sensor → decide (if) → switch something.

🎛 The HC-SR04 measures distance by echo like a bat: ping → wait for echo → distance = time × speed of sound / 2. Accurate to 3 mm — for €3.
🎯
测验一下吧!
用练习巩固主题——就像课后练习
测验——选择翻译 → 🖨 练习纸
← 上一课 下一课 →
⛅ 14° Potsdam 💨 11 km/h
💶 EUR 🇺🇸 1.12 USD 🇷🇺 93.87 RUB 🇵🇱 4.39 PLN 🇺🇦 50.32 UAH EZB · daily