Jorge Ramírezbryan costanichAdrian Stevens
Published © Apache-2.0

Getting Started with Netduino by Controlling the Onboard LED

You have all this C# coding knowledge and you want build hardware gadgets. Try Netduino, which is basically a powerful Arduino running .Net!

EasyFull instructions provided841
Getting Started with Netduino by Controlling the Onboard LED

Things used in this project

Hardware components

Netduino3 WiFi
Netduino3 WiFi
×1
Netduino3 Ethernet
Netduino3 Ethernet
×1
Netduino3
Netduino3
×1
Netduino Plus 2
Netduino Plus 2
×1
Netduino 2
Netduino 2
×1

Software apps and online services

Visual Studio 2015
Microsoft Visual Studio 2015

Story

Read more

Code

Netduino Blinky Code

C#
Paste this code into your Main method. What It will do is make the onboard LED to turn on and off for intervals of 250 milliseconds.
using System.Threading;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace Blinky
{
    public class Program
    {
        public static void Main()
        {
            // Create an output port (a port that can be written to) 
            // and wire it to the onboard LED
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);

            // run forever
            while (true)
            {
                led.Write(true); // turn on the LED
                Thread.Sleep(250); // sleep for 250ms
                led.Write(false); // turn off the LED
                Thread.Sleep(250); // sleep for 250ms
            }
        }
    }
}

Credits

Jorge Ramírez

Jorge Ramírez

5 projects • 9 followers
Contact
bryan costanich

bryan costanich

5 projects • 7 followers
Contact
Adrian Stevens

Adrian Stevens

5 projects • 5 followers
Contact

Comments

Add projectSign up / Login