I’m getting started with Netduino

February 25, 2012 on 2:51 pm | In DotNet, Netduino | No Comments

I’m recently extending my .NET toolbox with .NET Micro Framework skills. I got myself a Netduino board and I’m currently tinkering. Here is the my HELLO WORLD program:

 1: OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
 2: 
 3: while (true)
 4: {
 5:     foreach (char t in "HELLO WORLD")
 6:     {
 7:         for (int i =
 8:              ",ETIANMSURWDKGOHVF,L,PJBXCYZQ,,54
                 ,3,,,2,,,,,,,16,,,,,,,7,,,8,90".IndexOf(t);
 9:              i > 0; i /= 2)
 10:         {
 11:             led.Write(true);
 12:             if ("-."[i-- % 2] == '.')
 13:                 Thread.Sleep(100);
 14:             else
 15:                 Thread.Sleep(300);
 16:             led.Write(false);
 17:             Thread.Sleep(100);
 18:         }
 19:         Thread.Sleep(300);
 20:         if (t.Equals(' ')) Thread.Sleep(400);
 21:     }
 22: 
 23:     Thread.Sleep(1400);
 24: }

 

Yeap I’m blinking the hello to the world with the Netduino onboard LED and Morse code (thanks for the Morse code translator to the Code Golf community).

Here is the Netduino in action:

Powered by WordPress with Pool theme design by Borja Fernandez.
Text © Marcin Kawalerowicz. Hosting CODEFUSION.