February 2012
Beginner
100 pages
2h 6m
English
Now you’ve got a directory with the following files in it:
Makefile
MetaDataProcessor.exe
Microsoft.SPOT.Hardware.dll
Microsoft.SPOT.Native.dll
Microsoft.SPOT.TinyCore.dll
SecretLabs.NETMF.Hardware.Netduino.dll
SecretLabs.NETMF.Hardware.dll
mscorlib.dll
All you need to add is a program (named Program.cs) and a subdirectory (Properties) with a file called AssemblyInfo.cs in it.
Try it out with the program from Chapter 3. Here’s what needs to go inside your Program.cs:
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
namespace MonoNetduinoApp
{
public class Program
{
public static void Main()
{
// write your code here
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
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
}
}
}
}And here’s what you need inside of Properties\AssemblyInfo.cs (you will need to create the Properties subdirectory):
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Blinky")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Blinky")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.0.0.0")] ...Read now
Unlock full access