กลับไปหน้ารวมไฟล์
diy-pc-stats-monitor-3d458f.md

Overclocking Telemetry: จอภาพแสดงสถานะ PC

การตรวจสอบอุณหภูมิของ RTX GPU ขนาดใหญ่ต้องกด Alt+Tab ออกจากเกม FPS ที่กำลังเข้มข้น ซึ่งจะทำให้ frame rate ตก. โปรเจกต์ DIY PC Stats Monitor แก้ปัญหานี้ด้วยการถ่ายโอนข้อมูล Telemetry ออกมาแสดงภายนอก! โดยรันระบบสถาปัตยกรรมคู่ที่น่าทึ่ง: Backend ที่เขียนด้วย C# หรือ Python ขนาดใหญ่ซึ่งทำงานบน PC ระบบ Windows 4GHz จะดักจับข้อมูลจากเซ็นเซอร์อุณหภูมิของโปรเซสเซอร์อย่างรวดเร็ว จากนั้นส่ง payload ดังกล่าวผ่าน pure USB-Serial ไปยัง Arduino Uno ขนาดเล็ก ซึ่งจะวาดหน้าจอเสริมสำหรับแสดงข้อมูลสำคัญอย่างรวดเร็ว!

1306_oled_retro_game_display_1772681532057.png

Payload ฝั่ง PC Host (WMI หรือ HWINFO API)

Arduino นั้นไร้ประโยชน์โดยสิ้นเชิงในส่วนนี้; มันไม่รู้อะไรเลยเกี่ยวกับ AMD หรือ Intel processor ขนาดใหญ่ที่รัน Windows 11.

  1. ผู้ใช้ต้องเขียน Python script ในเครื่องที่รันอยู่ถาวรใน Windows Taskbar!
  2. โค้ด Python ใช้ไลบรารี <psutil> หรือ <WMI> เพื่อสอบถามข้อมูลจาก motherboard อย่างละเอียด.
  3. gpu_temp = psutil.sensors_temperatures()['coretemp'][0].current
  4. Python script จะจัดโครงสร้าง Telemetry จำนวนมากให้อยู่ในรูปแบบข้อมูลดิบที่คั่นด้วยคอมมา: "C: 64, G: 81, R: 14" (อุณหภูมิ CPU, อุณหภูมิ GPU, การใช้งาน RAM %).
  5. โดยใช้ <import serial>, script จะรัน ser.write(payload.encode()) โดยตรงลงไปในสาย USB เสมือน COM4 ที่ความเร็ว 115200 baud พอดี!

การ Demux ข้อมูล Serial และการวาด I2C Arrays

Arduino Nano ถูกติดไว้กับกระจกด้านในของเคส PC Tower ขนาดใหญ่โดยตรง.

  • โค้ด C++ ถูกครอบคลุมโดย Parser loop ที่ทำงานอย่างรวดเร็ว.
  • มันจะดักจับ Serial String ขนาดใหญ่ โดยใช้ substring() เพื่อแยกชุดข้อมูลจำนวนเต็ม!
if (Serial.available()) {
  String dataString = Serial.readStringUntil('\n'); // รับ payload ทั้งหมด!
  // ส่ง payload โดยตรงไปยัง I2C pixel matrix!
  drawCPUBarGraph(cpuTempVariable); 
}
  • การคำนวณ Screen Buffer: Arduino ใช้ <Adafruit_SSD1306.h>.
  • ในการวาด "Loading Bar" ที่จะขยายตัวในแนวนอนเมื่อ GPU มีอุณหภูมิถึง 90C คุณใช้ fillRect().
  • display.fillRect(10, 20, map(gpuTempVariable, 30, 100, 0, 100), 10, WHITE);
  • หน้าจอจะวาดแถบกราฟิกใหม่ทันที ทำให้เกิดจอแสดงผลวินิจฉัยฮาร์ดแวร์เสริมที่มีความเป็นมืออาชีพอย่างแท้จริง โดยไม่ส่งผลกระทบต่อ Windows gaming frame buffer เลย!

การตั้งค่าพื้นฐานสำหรับ Host Integration

  • Arduino Nano (จำเป็นต้องมีขนาดที่เล็กเป็นพิเศษ! Nano เสียบผ่าน Mini-USB เข้ากับ 9-pin USB header ภายในของ motherboard PC โดยตรง).
  • 0.96" I2C OLED หรือ 2.8" SPI TFT Display Block.
  • PC ที่รัน custom Python script หรือ Open Hardware Monitor (OHM) plugins!
  • สาย Jumper cable แบบ 4-Pin ที่เชื่อมต่อสายไฟของ screen matrix อย่างปลอดภัย!

ข้อมูล Frontmatter ดั้งเดิม

title: "DIY PC Stats Monitor"
description: "Desktop architectural bypass! Commandeer the massive processing overhead of Open Hardware Monitor APIs via C# or Python, executing complex JSON cascades directly through the USB-Serial COM port specifically to render dynamic performance statistics on external OLEDs."
category: "Screens & Displays"
difficulty: "Advanced"