Skip to main content

Meadow.Foundation.Audio.Mp3.Yx5300

Yx5300
StatusStatus badge: working
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Audio.Mp3.Yx5300

Code Example

Yx5300 mp3Player;

public override Task Initialize()
{
Resolver.Log.Info("Initialize...");

mp3Player = new Yx5300(Device, Device.PlatformOS.GetSerialPortName("COM4"));

return Task.CompletedTask;
}

public override async Task Run()
{
mp3Player.SetVolume(15);

var status = await mp3Player.GetStatus();
Resolver.Log.Info($"Status: {status}");

var count = await mp3Player.GetNumberOfTracksInFolder(0);
Resolver.Log.Info($"Number of tracks: {count}");

mp3Player.Play();

await Task.Delay(5000); //leave playing for 5 seconds

mp3Player.Next();

await Task.Delay(5000); //leave playing for 5 seconds
}

Sample project(s) available on GitHub

Wiring Example

To wire a Yx5300 to your Meadow board, connect the following:

Yx5300Meadow Pin
GNDGND
VCC3.3V
RXD01
TXD00

Wiring a Yx5300 to a Meadow F7