ข้อมูลเข้า ข้อมูลออก และโลกจริง
เซนเซอร์รับรู้โลกและตัวกระตุ้นเปลี่ยนแปลงโลกได้อย่างไร
ข้อมูลเข้า ข้อมูลออก และโลกจริง เป็นบทเรียน Arduino & IoT Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Arduino & IoT Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Arduino & IoT Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
Two Directions
Every Arduino project is built from two flows: information coming in from the world, and signals going out to change it. 🙂
Inputs Bring Data In
An input is anything that tells your board about its surroundings, like a button being pressed or a room getting warmer.
Sensors Read the World
A sensor is an input device that measures something real, heat, light, or distance, and hands your board a number.
Outputs Push Action Out
An output is how your board changes the world: lighting an LED, spinning a motor, or beeping a buzzer.
Actuators Do the Doing
An actuator is an output that creates physical action, like a motor that moves or a speaker that makes sound.
Pins Carry Both
The same Arduino pins handle both jobs. You simply tell each pin in code whether it should listen or speak.
Setting a Pin's Role
You declare a pin's direction with one command. Here pin 13 is set up as an output so it can drive an LED.
pinMode(13, OUTPUT);Reading an Input
To listen instead, you read a pin's value. This grabs the state of a button wired to pin 2 so your code can react.
int state = digitalRead(2);The Loop That Joins Them
The magic is connecting them: read an input, decide, then drive an output. That tiny chain is the core of every gadget.
A Familiar Example
A motion light reads a sensor for movement, then drives a lamp on. Input in, output out, just like you'll build.
Why It Matters
Master inputs and outputs and you can build almost anything. Every project you'll make is just a clever mix of these two.
Quick Check
Let's sort inputs from outputs.
Recap
Inputs and sensors bring data in; outputs and actuators push action out. Read, decide, act, that loop powers every device. 🔁
คำถามที่พบบ่อย
บทเรียน “ข้อมูลเข้า ข้อมูลออก และโลกจริง” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “ข้อมูลเข้า ข้อมูลออก และโลกจริง” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Arduino & IoT Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Arduino & IoT Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “ข้อมูลเข้า ข้อมูลออก และโลกจริง”
เซนเซอร์รับรู้โลกและตัวกระตุ้นเปลี่ยนแปลงโลกได้อย่างไร คุณปฏิบัติ Arduino & IoT Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Arduino & IoT Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน Arduino & IoT Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน
บทเรียน “ข้อมูลเข้า ข้อมูลออก และโลกจริง” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน Arduino & IoT Academy นี้ได้ไหม
ได้ บทเรียน Arduino & IoT Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- จากคอมพิวเตอร์สู่ไมโครคอนโทรลเลอร์
- ความหมายของ Internet of Things
- ข้อมูลเข้า ข้อมูลออก และโลกจริง
- แนวคิดอุปกรณ์อัจฉริยะชิ้นแรกของคุณ