First, I created a bitmap file, 8 by 8 pixels. It looks like the following: (well... it is a really REALLY small file)
In your C# project, use "add a new file" to add "MyResources.resx". Open "MyResources.resx" and use "add existing file" to add "examplebitmap.bmp". This is the fastest way to embed an image into your project.
(note: this takes up a lot of your precious flash memory! remember: the Netduino Plus 2 also has a microSD card slot you can use, or you can even download images from the network since it has built-in Ethernet)
(note: I have included JPEG and GIF decoding, but I haven't tried them out yet)
To use the resource, you can simply write
Bitmap bm = MyResources.GetBitmap(MyResources.BitmapResources.examplebitmap);
We are using a 8 pixel tall panel so it makes sense to use a font specifically designed to be 8 pixels tall. I'm using one called "Apple ][" from http://www.dafont.com/apple.font. Download the .ttf file.
Use "Tiny Font Tool" from http://informatix.miloush.net/microframework/Utilities/TinyFontTool.aspx to generate a .tinyfnt file. I called mine "apple2.tinyfnt"
(note: the porting kit comes with another tool called "TFConvert.exe" to do the same thing but "Tiny Font Tool" is MUCH better, thank you Miloush!)
Open "MyResources.resx" and use "add existing file" to add "apple2.tinyfnt".
You can now use the font like so:
Font f = MyResources.GetFont(MyResources.FontResources.apple2);
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; using NeoPixel; using Microsoft.SPOT.Presentation.Media; namespace NeoPixelBitmapTextDemo { public class Program { public static void Main() { NeoPixelWriter w = new NeoPixelWriter(Pins.GPIO_PIN_D0); while (true) { foreach (char c in "ABCabc") { for (int i = -8; i < 8; i++) { Bitmap bm = MyResources.GetBitmap(MyResources.BitmapResources.examplebitmap); Font f = MyResources.GetFont(MyResources.FontResources.apple2); bm.DrawText("" + c, f, Color.White, 1, i); w.Write(bm, NeoPixelWriter.GridArrangment.LeftToRight_TopToBottom_Zigzag); Thread.Sleep(100); } } } } } }