Main Site Documentation

Second Project cannot find definition of OutputPort


#1

Received the PandaII today. Installed software per instructions at http://www.tinyclr.com/support/

Compiled and ran the “Hello World” program and seemed to work as LED stopped flashing and could see the “Hello World” in the Debugger Output pane.

Now moved on to the LED flashing program and am stumped at where the type OutputPort is defined.

This is my code so far but it is failing to compile because does not find the type or namespace ‘OutputPort’ or ‘Cpu’. So I am missing a reference but can’t figure out which one to add.

I have following references added to the project:
FEZPanda_II_GHIElectronics.NETMF.FEZ
GHIElectronics.NETMF.System
Microsoft.SPOT.Native
mscorlib

and this is the code:

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.System;
using System.Threading;

namespace MFConsoleApplication1
{
public class Program
{
public static void Main()
{
OutputPort LED;
LED = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, true);
}
}
}


#2

here’s a tip. If you create a NEW PROJECT using the Panda II template, you’ll get a working blink-LED example. Then you can see what references it adds.

I can tell you though that this is in Microsoft.spot.hardware.


#3

please use code tags so your code is readable.


#4

Thanks Brett… added the reference to Microsoft.SPOT.Hardware and got it working.