Petoi Doc Center
🇹🇭 Thai
🇹🇭 Thai
  • ยินดีต้อนรับสู่ Petoi Doc Center
  • Infrared Remote
    • รีโมทคอนโทรล
  • Mobile App
    • คาลิเบเตอร์และคอนโทรลเลอร์
  • Desktop APP
    • การแนะนำเบื้องต้น
    • ตัวอัปโหลดเฟิร์มแวร์
    • การคาลิเบรทข้อต่อ
    • สกิลคอมโพสเซอร์
  • Arduino IDE
    • อัปโหลด Sketch สำหรับ NyBoard
    • อัปโหลด Sketch สำหรับ BiBoard
    • การคาลิเบรทด้วย Arduino IDE
    • ซีเรียลมอนิเตอร์
  • API
    • 🖇️ซีเรียลโปรโตคอล
    • 🐍คู่มือผู้ใช้ Python SerialMaster
    • 🐛MicroPython คอนโทรลเลอร์
      • การเรียกใช้ MicroPython บน ESP8266
      • ติดตั้ง WebREPL
      • การใช้โปรโตคอล ESP-NOW
    • 🍓การสื่อสารผ่านพอร์ตซีเรียลของ Raspberry Pi
    • 🤖ROS
  • Nyboard
    • NyBoard V1_0
    • NyBoard V1_1
  • BIBOARD
    • คู่มือเริ่มต้นใช้งาน BiBoard ฉบับรวบลัด
    • Demo Applications
      • 1.GPIO port
      • 2.Serial port
      • 3.Analog-digital converter
      • 4.Digital-Analog Converter
      • 5.EEPROM (Electrically Erasable Programmable read only memory)
      • 6.Gyro IMU(MPU6050)
      • 7.Infrared remote control
      • 8.PWM(Pulse Width Modulation)
      • 9.Servo(under construction)
      • 10.Classic Bluetooth serial port SPP
      • 11.Bluetooth low energy (BLE) serial port pass-through
      • 12.File system SPIFFS
      • 13.Add hardware partition configuration option in Arduino IDE
      • 14.Play MP3
      • 15.The usage of Wi-Fi OTA(Over-The-Air)
  • Communication Modules
    • Introduction
    • USB Uploader (CH340C or CH343G)
    • Dual Mode Bluetooth
    • WiFi ESP8266
      • ESP8266 + Python Scripts Implement wireless crowd control
  • Extensible Modules
    • Introduction
    • MU Camera
    • Ultrasonic Sensor
    • Light Sensor
    • Touch Sensor
    • Gesture Sensor
    • PIR Motion Sensor
  • Applications
    • Skill Creation
    • OpenCat Imitation Tutorial
    • Programmable Puppet Character
  • History
    • Upload Sketch For NyBoard (software 1.0)
  • Technical Support
    • 🛠️Supporting Application and Software
    • 🙋‍♂️FAQ(Frequently Asked Questions)
  • Useful Links 🕸
    • 🔭Official Site of Petoi
    • 💿GitHub of OpenCat
    • 🎪PetoiCamp (Forum)
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. BIBOARD
  2. Demo Applications

14.Play MP3

Previous13.Add hardware partition configuration option in Arduino IDENext15.The usage of Wi-Fi OTA(Over-The-Air)

Last updated 2 years ago

Was this helpful?

มีตัวอย่างชื่อ testMP3 ในไดเร็กทอรีไฟล์ "OpenCatEsp32/ModuleTests" หน้าที่หลักของตัวอย่างนี้คือการเล่นไฟล์ .mp3 ที่จัดเก็บไว้ในระบบไฟล์ SPIFFS ผู้ใช้สามารถเลือกเล่นไฟล์ .mp3 ต่างๆ ได้โดยการป้อนตัวเลข 0~6 (หมายเลขดัชนีไฟล์ .mp3) ในจอภาพอนุกรม

ก่อนคอมไพล์ตัวอย่าง (, development board esp32 2.0.*, library , ).

หลังจากคอมไพล์แล้ว ให้ใช้ปลั๊กอินอัปโหลดไฟล์ SPIFFS ล่าสุดเพื่ออัปโหลดไฟล์ .mp3 ไปยังพาร์ติชันระบบไฟล์ SPIFFS ของ BiBoard สำหรับรายละเอียด โปรดดูบทที่ .

หมายเหตุ:

  • Arduino IDE 2.0 ไม่สามารถเพิ่มตัวเลือกการกำหนดค่า large_spiffs_16MB (4.5MB APP with OTA/6.93MB SPIFFS) ได้ในขณะนี้

  • ปลั๊กอินอัปโหลดไฟล์ ใน Arduino IDE 1.8.* เขียนด้วยภาษาจาวา และ Arduino IDE 2.0 เขียนด้วยภาษาอื่น (TypeScript + Golang) ดังนั้นปลั๊กอินอัปโหลดก่อนหน้านี้จึงไม่สามารถใช้ใน Arduino IDE 2.0 ได้ ขณะนี้ยังไม่รองรับปลั๊กอินอัปโหลดไฟล์ Arduino IDE 2.0 SPIFFS

ดังนั้นขอแนะนำให้คุณติดตั้งและใช้ ชั่วคราวเพื่ออัปโหลดไฟล์ร่างและ .mp3

แน่นอน คุณยังสามารถใช้ VS Code + PlatformIO เพื่ออัปโหลดไฟล์ร่างและ .mp3 สำหรับรายละเอียด โปรดดูเอกสารต่อไปนี้:

ก่อนอัปโหลดไฟล์ร่างและ .mp3 โปรดย้ายโฟลเดอร์ "data" ไปยังไดเร็กทอรีรูท(root)ของโปรเจ็กต์ จัดเก็บไฟล์โค้ดในไดเร็กทอรี "src" และกำหนดค่าตัวเลือกพาร์ติชัน "board_build.partitions" ใน platformio.ini ใน ไดเร็กทอรีรูทของโปรเจ็กต์ดังแสดงในรูปต่อไปนี้:

Arduino IDE 1.8.*
ESP8266Audio 1.9.7
partition configuration BiBoard V0
File System SPIFFS
SPIFFS file upload plugin
Arduino IDE 1.8.* IDE
Getting Started with VS Code and PlatformIO IDE for ESP32 and ESP8266 (Windows, Mac OS X, Linux Ubuntu)
ESP32 with VS Code and PlatformIO: Upload Files to Filesystem (SPIFFS)
download, install and configure the software environment