Getting started with IoT Netudio 3 ethernet a compatibility Arduino board

enter image description here

Getting started with Studio 3 ethernet

I think many of you may be familiar with Arduino and Raspberry Pi but today I would like to introduce you to an Arduino compatibility board "Netduino".

As the name starts with NET, it implies that there must be something related to .NET.

In fact, Netduino is a .NET micro framework microcontroller board which allows you to use C# and .NET to develop an IoT, smart home, or other kinds of electronic projects

Let's start coding on Netduino

Install the development tool Visual Studio 2015 community Install Visual Studio 2015 community edition. You can download from the following link.

Link to download Visual Studio 2015 community edition

Unzip the ISO file and launch the installation that you just downloaded and select a custom installation. Keep the default settings, then click next:

launch page Visual Studio

Change the default location for installation if you want.

location of the installation

Follow the installation and wait for several minutes until it finishes, then restart your computer.

Finishing Visual Studio installation

.NET Microframework

Install the .NET Microframework. You can download it from the following link

Link to download .NET Microframework

install .NET Microframework

NETMF Plugin for Visual Studio 2015

Install the NETMF Plugin for Visual Studio 2015. You can download it from the following link: Link to download NETMF Plugin for Visual Studio Visual Studio 2015

install .NET Microframework plugin

Netduino SDK

Install the Netduino SDK. You can download it from the following link.

Link to download Netduino SDK

install Netduino SDK

Accept a driver alert.

driver license

Create a new project

Launch Visual Studio 2015 Community edition and log in with your Microsoft account, e.g. [email protected].

After you logged in, in the menu bar of Visual Studio, select File > New > Project In the template node, select Visual C# > Micro Framework > Console Application

Enter name: NetduinoBlink and you can save to the default location or pick other locations. Then click OK to create a new project.

create a new project

Go to Solution Explorer window right click on the Reference node and click Add Reference. In the pop-up window, add these references:

  • Microsoft.SPOT.Hardware
  • SecretLabs.NETMF.Hardware
  • SecretLabs.NETMF.Hardware.Netduino

Writing simple codes

Open Program.cs and add the following code block:

using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
using System.Threading;

namespace NetduinoBlink
{
    public class Program
    {
        const int SLEEP_IN_MILLISECONDS = 250;

        public static void Main()
        {
            // Configure an output port for us to "write" to the LED
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
            // Note that if we didn't have the SecretLabs.NETMF.Hardware.Netduino DLL, 
            // We could also manually access it this way:
            // OutputPort led = new OutputPort(Cpu.Pin.GPIO_Pin10, false); 
            while (true)
            {
                led.Write(true); // turn on the LED 
                Thread.Sleep(SLEEP_IN_MILLISECONDS); // sleep for 250ms 

                led.Write(false); // turn off the LED 
                Thread.Sleep(SLEEP_IN_MILLISECONDS); // sleep for 250ms 
            }
        }
    }
}

Deploy the app to the board

Connect your Netduino board to your USB port. In Visual Studio, go to the solution explorer > select the NeduinoBlink project node > right click and select Properties

deploy the app to the board

Select the NET Micro Framework tab > set the Transport option to USB > set the Device option to your connected Netduino board:

board properties

Press Ctrl + F5 or go to Debug > and select Start without debugging. Wait a few seconds while your code is compiled and uploaded to the board. After everything is done, you should have a blinking LED on your Netduino board.

running result

Optionally, if you have a 0x80131700 build error while building the program, please try to install .NET 3.5 that contains .NET 2.0 from the following link: Link to download .NET 3.5 full

credit

the original post from Getting started with IoT Netduino 3 ethernet a compatibility Arduino board - Jetabroad tech blog http://developer.wildernesslabs.co/Netduino/Getting_Started/