Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Characteristic Locus
Inheritance object > Yx5300
Implements IDisposable
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Audio.Mp3
Assembly Yx5300.dll

Syntax

public class Yx5300 : IDisposable

Constructors

Yx5300(ISerialPort)

Create a YX5300 mp3 player object

Declaration
protected Yx5300(ISerialPort serialPort)

Parameters

Type Name Description
ISerialPort serialPort

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Yx5300(IMeadowDevice, SerialPortName)

Create a YX5300 mp3 player object

Declaration
public Yx5300(IMeadowDevice device, SerialPortName serialPortName)

Parameters

Type Name Description
IMeadowDevice device

Meadow device

SerialPortName serialPortName

Name of serial port connected to YX5300

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Properties

IsDisposed

Is the object disposed

Declaration
public bool IsDisposed { get; }

Property Value

Type Description
bool

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Dispose(bool)

Dispose of the object

Declaration
protected virtual void Dispose(bool disposing)

Parameters

Type Name Description
bool disposing

Is disposing

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

GetIndexOfCurrentFile()

Get index of currently playing file

Declaration
public Task<byte> GetIndexOfCurrentFile()

Returns

Type Description
Task<byte>

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

GetNumberOfFolders()

Get number of folders

Declaration
public Task<byte> GetNumberOfFolders()

Returns

Type Description
Task<byte>

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

GetNumberOfTracksInFolder(byte)

Get count of mp3 files in folder

Declaration
public Task<byte> GetNumberOfTracksInFolder(byte folderIndex)

Parameters

Type Name Description
byte folderIndex

index of folder

Returns

Type Description
Task<byte>

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

GetStatus()

Get status of YX5300

Declaration
public Task<Yx5300.PlayStatus> GetStatus()

Returns

Type Description
Task<Yx5300.PlayStatus>

PlayStatus enum

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

GetVolume()

Get audio volume (0-30)

Declaration
public Task<byte> GetVolume()

Returns

Type Description
Task<byte>

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Next()

Advance to next track

Declaration
public void Next()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Pause()

Pause current mp3

Declaration
public void Pause()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Play()

Play current file

Declaration
public void Play()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Play(byte)

Play song at index

Declaration
public void Play(byte songIndex)

Parameters

Type Name Description
byte songIndex

index of mp3 file in folder

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Previous()

Move back to previous track

Declaration
public void Previous()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Reset()

Reset the YX5300 hardware

Declaration
public void Reset()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

SetVolume(byte)

Set volume of YX5300

Declaration
public void SetVolume(byte volume)

Parameters

Type Name Description
byte volume

byte value from 0-30

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Sleep()

Set the power state to sleep

Declaration
public void Sleep()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

Stop()

Stop current mp3

Declaration
public void Stop()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

VolumeDown()

Decrease audio volume by 1 (0-30)

Declaration
public void VolumeDown()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

VolumeUp()

Increase audio volume by 1 (0-30)

Declaration
public void VolumeUp()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7

WakeUp()

Set the power state to normal operations

Declaration
public void WakeUp()

Remarks

Yx5300
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet 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:

Yx5300 Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Wiring a Yx5300 to a Meadow F7