BrainPad Pulse and TinyCLR

First tests of the Display class!
pulse1

using BrainPad;

namespace PulseHello
{
class Program
{
static void Main()
{
var hello = “Hello GHI”;

        byte[] ship = {
            0,0,0,1,1,0,0,0,
            0,0,0,1,1,0,0,0,
            0,1,1,1,1,1,1,0,
            1,1,1,1,1,1,1,1,
            1,0,0,0,0,0,0,1,
           };

        byte[] monster ={
            0,0,0,1,1,0,0,0,
            0,0,1,1,1,1,0,0,
            0,1,1,1,1,1,1,0,
            1,1,0,1,1,0,1,1,
            1,1,1,1,1,1,1,1,
            0,0,1,0,0,1,0,0,
            0,1,0,1,1,0,1,0,
            1,0,1,0,0,1,0,1,
            };

        Display.Text(hello, 20, 0);
        Display.Rect(0, 20, 21, 21);
        Display.Circle(10, 30, 8);
        Display.Point(10, 30, 255);
        Display.FillRect(22, 20, 21, 21);
        Display.Line(100, 0, 100, 63);

       // Display.TextEx(Display.CreateImage(5, 7, "Space", 1, 1, 0), 20, 60, 2, 2); ???
        Display.Image(Display.CreateImage(8, 5, ship, 1, 1, 1), 105, 10);
        Display.Image(Display.CreateImage(8, 8, monster, 1, 1, 1), 115, 10);
        Display.Image(Display.CreateImage(8, 5, ship, 2, 2, 1), 105, 30);
        Display.Image(Display.CreateImage(8, 8, monster, 2, 2, 1), 105, 40);
        Display.Show();
    }
}

}

How do you use Display.TextEx (object, double, double, double, double) ? I think we need to transform a string into an object with Display.CreateImage (double, double, string, double, double, double) but I can’t find values ​​for width and height. :thinking: An example An example would be appreciated. :upside_down_face:

5 Likes

We’re working on examples as we speak.

Here is an example of the TextEx() method.

TextEx(string, x, y, hScale, vScale)

TextEx(“Large Text”,0,10,2,2);

3 Likes

Thank’s Greg.

Hello Greg,
I’m in the process of adapting your Space Invasion game (C# Games 101 – BrainPad) for BrainPad Pulse.

How does Button work? I used a random value for detectPeriod. :upside_down_face:
Can I have BrainPad Pulse Schematic and examples to use the Buzzer. Thank you.

Space Invasion V1

1 Like

Sent you an email with some Insider info. We’ll be releasing more publicly very soon. Stay tuned.

1 Like

Thank’s a lot. I will be able to test. :+1: :smiley:

Your “Space Invasion” with electronic sounds and effects. I’m testing in Python and if it’s good it will be a project for my student next year. Thank’s a lot for your work.

Space Invasion V1

4 Likes