Skip to main content
Any Framework

Iot.Device.Yx5300 assembly for .NET nanoFramework C# projects

Published
May 15, 2024
2y ago
Total Downloads
25.9K
25,922

Install

dotnet add package nanoFramework.Iot.Device.Yx5300 --version 1.2.548

No framework information available.

README

YX5200/YX5300 - MP3 Player

Use this driver to control the Keyestudio YX5200-24SS MP3/Jaycar XC3748 Music Player Module

This MP3 module is a MP3/WAV/WMA music player. It uses YX5200/YX5300 at its core and it plays files from an integrated SD card reader. It is connected with Serial port.

Documentation

See this article for a good oversight.

Usage

using Iot.Device.Yx5300;
using nanoFramework.Hardware.Esp32;
using System.Threading;

const int FolderNumber = 1;
const int FileNumber = 1;
Yx5300 mp3Player;

// Set GPIO functions for COM2 (this is UART2 on ESP32)
Configuration.SetPinFunction(Gpio.IO17, DeviceFunction.COM2_TX);
Configuration.SetPinFunction(Gpio.IO16, DeviceFunction.COM2_RX);

// Open COM2 and instantiate player
mp3Player = new Yx5300("COM2");

// Start player and play some files
Thread.Sleep(1000);
mp3Player.Volume(Yx5300.MaxVolume / 2);

// Repeat a folder
mp3Player.PlayFolderRepeat(FolderNumber);
mp3Player.Play();

// Repeat a file
mp3Player.PlayTrackRepeat(FileNumber);
mp3Player.Play();

Thread.Sleep(Timeout.Infinite);

Changes from Previous Version

No structural changes between v1.2.532 and v1.2.548.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.