22 lines
		
	
	
	
		
			653 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			653 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Threading;
 | |
| using ServicePoint;
 | |
| 
 | |
| // TODO: replace with new Connection("127.0.0.1:2342") to send to a real display
 | |
| var connection = Connection.NewFake();
 | |
| connection.Send(Command.Clear());
 | |
| 
 | |
| connection.Send(Command.Brightness(5));
 | |
| 
 | |
| connection.Send(Command.Utf8Data(0,0, CharGrid.Load("This is a test")));
 | |
| 
 | |
| var pixels = Bitmap.NewMaxSized();
 | |
| for (ulong offset = 0; offset < pixels.Width(); 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, CompressionCode.Lzma));
 | |
|     Thread.Sleep(14);
 | |
| }
 | 
