nanoFramework.Iot.Device.Ws28xx 1.2.580
前缀已保留
dotnet add package nanoFramework.Iot.Device.Ws28xx --version 1.2.580
NuGet\Install-Package nanoFramework.Iot.Device.Ws28xx -Version 1.2.580
此命令旨在在 Visual Studio 的包管理器控制台中使用,因为它使用 NuGet 模块版本的 Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Ws28xx" Version="1.2.580" />
对于支持 PackageReference 的项目,将此 XML 节点复制到项目文件中以引用该包。
paket add nanoFramework.Iot.Device.Ws28xx --version 1.2.580
NuGet 团队不提供对该客户端的支持。请联系其 管理员 以获得支持。
#r "nuget: nanoFramework.Iot.Device.Ws28xx, 1.2.580"
#r 指令可以用在 F# Interactive 和多语言笔记本中。将此内容复制到交互式工具或脚本的源代码中,以引用该包。
// Install nanoFramework.Iot.Device.Ws28xx as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Ws28xx&version=1.2.580 // Install nanoFramework.Iot.Device.Ws28xx as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Ws28xx&version=1.2.580
NuGet 团队不提供对该客户端的支持。请联系其 管理员 以获得支持。
Ws28xx/WS2812B/WS2815B/WS2808/SK6812/Neo pixels 使用 SPI - LED 驱动器
此绑定允许您更新基于 Ws28xx 的 RGB LEDs 灯带和矩阵。
要在代码中查看如何使用此绑定,请参阅 示例。
文档
- WS2812B: 数据表
- WS2815B: 数据表
- WS2808: 数据表
- SK6812: 数据表
- Neo pixels 指南
- Neo pixels x8 stick
板
WS2812B
用法
using System;
using System.Collections.Generic;
using System.Device.Spi;
using System.Drawing;
using Iot.Device.Graphics;
using Iot.Device.Ws28xx;
// Configure the count of pixels
const int Count = 8;
Console.Clear();
// Must specify pin functions on ESP32
Configuration.SetPinFunction(23, DeviceFunction.SPI2_MOSI);
Configuration.SetPinFunction(19, DeviceFunction.SPI2_MISO);
Configuration.SetPinFunction(18, DeviceFunction.SPI2_CLOCK);
Configuration.SetPinFunction(22, DeviceFunction.ADC1_CH10);
// Using VSPI on bus 2 for ESP32 and pin 22 for chipselect
SpiConnectionSettings settings = new(2, 22)
{
ClockFrequency = 2_400_000,
Mode = SpiMode.Mode0,
DataBitLength = 8
};
using SpiDevice spi = SpiDevice.Create(settings);
Ws28xx neo = new Ws2808(spi, count);
//Ws28xx neo = new Ws2812b(spi, Count);
while (true)
{
Rainbow(neo, Count);
System.Threading.Thread.Sleep(100);
}
void Rainbow(Ws28xx neo, int count, int iterations = 1)
{
BitmapImage img = neo.Image;
for (var i = 0; i < 255 * iterations; i++)
{
for (var j = 0; j < count; j++)
{
img.SetPixel(j, 0, Wheel((i + j) & 255));
}
neo.Update();
}
}
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.Graphics.Core (>= 1.2.15)
- nanoFramework.System.Device.Gpio (>= 1.1.41)
- nanoFramework.System.Device.Spi (>= 1.3.52)
NuGet 包
此包未被任何 NuGet 包使用。
GitHub 仓库 (1)
显示与 nanoFramework.Iot.Device.Ws28xx 相关的 1 个最受欢迎的 GitHub 仓库
仓库 | 星标数 |
---|---|
nanoframework/nanoFramework.IoT.Device
📦 此仓库包括各种传感器、芯片、显示屏、帽子和驱动程序的 .NET nanoFramework 实现
|
版本 | 下载 | 最后更新 |
---|---|---|
1.2.580 | 232 | 6/28/2024 |
1.2.570 | 136 | 6/14/2024 |
1.2.560 | 176 | 5/29/2024 |
1.2.548 | 163 | 5/15/2024 |
1.2.436 | 947 | 11/10/2023 |
1.2.329 | 1,175 | 5/26/2023 |
1.2.316 | 358 | 5/16/2023 |
1.2.313 | 122 | 5/12/2023 |
1.2.308 | 134 | 5/11/2023 |
1.2.304 | 134 | 5/10/2023 |
1.2.297 | 158 | 5/3/2023 |
1.2.212 | 1,054 | 1/5/2023 |
1.2.203 | 508 | 12/28/2022 |
1.2.159 | 557 | 11/14/2022 |
1.2.153 | 368 | 11/5/2022 |
1.2.141 | 396 | 10/25/2022 |
1.2.122 | 498 | 10/12/2022 |
1.2.114 | 429 | 10/8/2022 |
1.2.95 | 472 | 9/22/2022 |
1.2.87 | 831 | 9/15/2022 |
1.2.73 | 379 | 9/8/2022 |
1.2.5 | 812 | 7/13/2022 |
1.1.141.41205 | 413 | 7/6/2022 |
1.1.118.19693 | 425 | 6/24/2022 |
1.1.116.8772 | 399 | 6/24/2022 |
1.1.58.10097 | 431 | 5/23/2022 |
1.1.27 | 453 | 4/26/2022 |
1.1.20 | 413 | 4/21/2022 |
1.1.7 | 424 | 4/18/2022 |
1.1.1 | 411 | 4/14/2022 |
1.0.300 | 431 | 4/1/2022 |
1.0.288-preview.118 | 128 | 3/28/2022 |
1.0.288-preview.113 | 117 | 3/25/2022 |
1.0.288-preview.110 | 108 | 3/25/2022 |
1.0.288-preview.73 | 126 | 2/25/2022 |
1.0.288-preview.48 | 129 | 2/4/2022 |
1.0.288-preview.42 | 124 | 1/31/2022 |
1.0.288-preview.22 | 117 | 1/27/2022 |
1.0.288-preview.20 | 121 | 1/27/2022 |
1.0.288-preview.16 | 130 | 1/27/2022 |
1.0.279 | 167 | 1/14/2022 |
1.0.272 | 146 | 1/10/2022 |
1.0.270 | 250 | 1/6/2022 |
1.0.259 | 296 | 12/9/2021 |
1.0.250 | 277 | 12/4/2021 |
1.0.248 | 4,450 | 11/24/2021 |
1.0.226 | 359 | 10/24/2021 |