Main Site Documentation

FEZ Domino to widescreen TV


OK, I cheated a bit and used a TellyMate shield but I was pleased when it just worked. Test code below; now to do something useful with it…


using System;
using System.Threading;
using System.IO.Ports;
using System.Text;

using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.FEZ;

namespace Domino___Serial {
    public class Program {
        static int counter = 0;
        public static void Main() {
            SerialPort UART = new SerialPort("COM1", 57600);
            while (true) {
                string comanda = "Counter: " + (counter++) + "\r";
                byte[] buffer = Encoding.UTF8.GetBytes(comanda);
                UART.Write(buffer, 0, buffer.Length);
                // Sleep for 0 milliseconds



…and now to make the classic pong game :slight_smile:

What is cool about this is that you can use a USB joystick :wink:


Probably not useful but it is one of my favourite programming exercises. I give you Conway’s Life:

I’ve uploaded the code here:

I’m a bit sad at how slow it runs - it was a lot faster on the Arduino (see here: Maybe I’m doing something obviously wrong in the code - I’ve only been writing C# a couple of days so it’s quite possible.



Looks good. To speed things up read about RLP.


Oh yes, RLP speeds it up alright!


Now I think the bottleneck is the 57k6 serial connection to the TellyMate shield. I’ve done some optimization of how the characters are transferred but there might be more to be had.

UPDATE I’ve uploaded the code as a .zip file attachment here:



Nice work for getting into RLP


Very cool.

Just looking at your src, maybe the drawing routine could be adapted to do a whole row at a time or alternativly do a clear screen & home - before the draw and just ignore drawing blank spaces.


I [italic]think[/italic] the current limiting factor speedwise is how fast you can send characters to the TellyMate shield - it’s official top speed is 57600 baud, which is 5760 characters a second. The grid is 38x25 which is 950 characters, therefore if they all change (so you have to display each one) the theoretical maximum refresh rate is 6 frames a second. Plus you have to send some control characters which adds even more bytes. Luckily in a typical Life generation far fewer than 100% of the cells change - this gives us some wiggle room for optimisations.

I hadn’t thought of CLS then only draw the non-blank cells - I’ll have to give it some thought.