mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-19 02:20:12 +01:00
960f12ebc5
original c# example equivalent works add uniffi bitvec original c# example now works with a few tweaks via uniffi
20 lines
488 B
C#
20 lines
488 B
C#
using System.Threading;
|
|
using ServicePoint;
|
|
|
|
var connection = new Connection("127.0.0.1:2342");
|
|
connection.Send(Command.Clear());
|
|
|
|
connection.Send(Command.Brightness(5));
|
|
|
|
var pixels = Bitmap.NewMaxSized();
|
|
for (ulong offset = 0; offset < ulong.MaxValue; offset++)
|
|
{
|
|
pixels.Fill(false);
|
|
|
|
for (ulong y = 0; y < pixels.Height(); y++)
|
|
pixels.Set((y + offset) % pixels.Width(), y, true);
|
|
|
|
connection.Send(Command.BitmapLinearWin(0, 0, pixels));
|
|
Thread.Sleep(14);
|
|
}
|