กลับไปหน้ารวมไฟล์
super-mario-theme-song-5bc394.md

ทำง่ายมากเลยน้อง ไม่ต้องใช้ตัวต้านทานปรับค่าได้ (potentiometer) แบบในรูปก็ได้นะ

รายละเอียดเทคนิคแบบจัดเต็ม

8-Bit Orchestral Synthesis

โปรเจกต์นี้สร้างเสียงเพลงสุดคลาสสิกของ Nintendo ขึ้นมาใหม่ โดยใช้ความสามารถของ Arduino ในการสร้างสัญญาณ PWM ความเร็วสูง และการแมปความถี่ให้เป็นโน้ตดนตรี

  • Frequency Modulation Engine: Arduino ใช้ฟังก์ชัน tone() ในการสร้างสัญญาณคลื่นสี่เหลี่ยม (square wave) ที่แม่นยำสำหรับแต่ละโน้ต ($C4, D4, E4$, ฯลฯ) เพลง "Overworld Theme" ทั้งเพลงจะถูกเก็บไว้ในรูปแบบอาร์เรย์ค่าคงที่ใน PROGMEM เพื่อประหยัดหน่วยความจำ RAM
  • Micro-Timing Logic: การจัดการจังหวะและความเร็วรายละเอียด ถูกจัดการโดยฟังก์ชัน playNote() ที่เราสร้างขึ้นเอง มันจะคำนวณระยะเวลาหยุดค้างตามค่า BPM (Beats Per Minute) ของเพลง เพื่อให้แน่ใจว่าจังหวะ "Swing" แบบเฉพาะของธีมมาริโอ้ยังคงอยู่ครบถ้วน

Multimedia Feedback

  • Sync-Pulse Visualizer: ทุกครั้งที่มีการเล่นโน้ต LED ตัวที่สองหรือ 8x8 LED Matrix จะกระพริบพร้อมจังหวะกับความถี่เสียง เป็นเหมือนตัวนับจังหวะแบบเห็นภาพให้กับผลงานของเรา

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

title: "Super Mario Theme Song"
description: "Plays beeps."
author: "isthistaken"
category: ""
tags:
  - "audio"
  - "music"
views: 6619
likes: 0
price: 699
difficulty: "Easy"
components:
  - "1x BC547 transistor"
  - "1x Jumper wires (generic)"
  - "1x Soldering iron (generic)"
  - "1x Speaker: 0.25W, 8 ohms"
  - "1x Arduino UNO"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "90248dcf1457808307a937ad4e8d7b9de698e681ab4ec8d65c797641bb52cbcc"
encryptedPayload: "U2FsdGVkX1//k3S4lh6VdZKpcMHjcMAykV5wuFLL++hyXXyM4TmvwiwGWxJs+CCu4ID7hszAx6msZvrHkd52hjMNAEIgM09qeD4K1M7PvF8="
seoDescription: "Play the Super Mario Theme Song with Arduino. A simple coding project that generates beeps."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/super-mario-theme-song-5bc394_cover.jpg"
lang: "th"