-
-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathSk6812.cs
29 lines (27 loc) · 1.06 KB
/
Sk6812.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using nanoFramework.Hardware.Esp32.Rmt;
namespace Iot.Device.Ws28xx.Esp32
{
/// <summary>
/// Represents the SK6812 Driver.
/// </summary>
/// <seealso cref="Iot.Device.Ws28xx.Ws28xx" />
public class Sk6812 : Ws28xx
{
/// <summary>
/// Initializes a new instance of the <see cref="Sk6812"/> class.
/// </summary>
/// <param name="gpioPin">The GPIO pin used for communication with the LED driver.</param>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
public Sk6812(int gpioPin, int width, int height = 1)
: base(gpioPin, new BitmapImageWs2808Grb(width, height))
{
ClockDivider = 4;
OnePulse = new RmtCommand(14, true, 12, false);
ZeroPulse = new RmtCommand(7, true, 16, false);
ResetCommand = new RmtCommand(500, false, 520, false);
}
}
}