Slider Bar
Lab 1: Slider & Bar Widget (ADC Visualization)
1. โครงสร้างภาพรวมของ Lab
Why? - ทำไมต้องเรียนรู้เรื่องนี้
What? - จะได้เรียนรู้อะไร
How? - จะทำอย่างไร

2. หลักการทำงานและ Flowchart
2.1 Slider vs Bar Concept
2.2 ADC Value Mapping Pipeline
2.3 Timer Update Flow
3. ฟังก์ชันสำคัญ (API Reference)
3.1 Slider Functions
Function
Parameters
Description
3.2 Bar Functions
Function
Parameters
Description
3.3 Common Styling
Function
Description
3.4 ADC Calculation Formulas
4. โค้ดตัวอย่าง (Step-by-Step Code)
4.1 Step 1: Global Variables และ Constants
4.2 Step 2: Simulated ADC Read
4.3 Step 3: Slider Event Callback
4.4 Step 4: Timer Callback สำหรับ Auto-Update
4.5 Step 5: Main Function - สร้าง UI ทั้งหมด
4.6 Data Flow Summary
5. องค์ความรู้และเทคนิค
5.1 Slider vs Bar - เมื่อไหร่ใช้อะไร
Feature
Slider
Bar
5.2 Animation Options
5.3 ทำ Slider เป็น Read-Only
5.4 เปลี่ยนสี Indicator ตามค่า
5.5 Integer Math vs Float
5.6 Memory Pattern: Static Variables
6. แบบฝึกหัด (Exercises)
Exercise 1: Battery Level Indicator
Exercise 2: Audio Mixer - Volume Control with Slider & Bar
Exercise 3: Multi-Channel Energy Meter (ท้าทาย)
7. References
Last updated
Was this helpful?