LED
Lab 3: LED Widget Control
1. โครงสร้างภาพรวมของ Lab
Why? - ทำไมต้องเรียนรู้เรื่องนี้
What? - จะได้เรียนรู้อะไร
ฟังก์ชัน
หน้าที่
How? - ทำอย่างไร

2. หลักการทำงานและ Flowchart
2.1 LED Widget Architecture
2.2 Slider Widget Architecture
2.3 Program Flowchart
3. ฟังก์ชันสำคัญ (API Reference)
3.1 LED Widget Functions
ฟังก์ชัน
พารามิเตอร์
คำอธิบาย
3.2 Slider Widget Functions
ฟังก์ชัน
พารามิเตอร์
คำอธิบาย
3.3 Style Functions ที่เกี่ยวข้อง
ฟังก์ชัน
คำอธิบาย
3.4 Slider Parts (สำหรับ Style ขั้นสูง)
Part
คำอธิบาย
4. โค้ดตัวอย่าง (Code Examples)
4.1 โค้ดอ้างอิง: part1_ex3_led_control()
part1_ex3_led_control()องค์ประกอบ
ตำแหน่ง
หน้าที่
4.2 LED สีต่างๆ
4.3 Slider กับ Custom Range
4.4 Slider Style Customization
5. องค์ความรู้และเทคนิค (Patterns & Tips)
5.1 Multiple Callbacks ควบคุม Widget เดียวกัน
5.2 ข้อผิดพลาดที่พบบ่อย
ข้อผิดพลาด
สาเหตุ
วิธีแก้
5.3 Virtual LED vs. Hardware LED
5.4 Brightness to Percentage Conversion
5.5 Timer Pattern (สำหรับ animation)
6. แบบฝึกหัด (Exercises)
Exercise 1: RGB LED Mixer - 15-20 นาที
Exercise 2: LED Traffic Light Simulation - 20-25 นาที
7. References
Last updated
Was this helpful?