i am sorry but i am still unclear, how i would go about programming for a custom board that exposes GPIOs that are not available on any of the boards,
In visual studio, i tried “Usbizi” project and the following code is not even supported.
OutputPort test = new OutputPort((Cpu.Pin)4, true);
and then when i go to a “Domino” application and that works fine ,
but it does not have “71” options for GPIOs only the ones that are available on the board which is obvious since its a "Domino " project…
so that is my question, if have a board where i expose most GPIOs how do i access them through Visual studio?
this is why i was thinking i have to edit the hardware provider class to “Add” the additional pins i am exposing. but .NETMF has close to nothing when it comes to online documentation and resources… not very hobby friendly. all i have is a book that skimmed through the process.
would that be in a “domino” project or a “Usbizi” project because in the domino project…Hardware does not exist in GHIElectronics.NETMF namespace even if i refrence it… and in a USBizi project OutputPort does not exist…
using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.Hardware;
namespace USBizi_Application1
{
public class Program
{
public static void Main()
{
OutputPort test = new OutputPort(GHIElectronics.NETMF.Hardware.USBizi.Pin.IO20, true);
}
}
}
that in a “USBizi” project gives me"The type or namespace name ‘OutputPort’ could not be found (are you missing a using directive or an assembly reference?) "
further more in a regular “Domino” project the follwoing code does not work either
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
//using GHIElectronics.NETMF.Hardware;
namespace FEZ_Domino_Application1
{
public class Program
{
public static void Main()
{
// Blink board LED
OutputPort test = new OutputPort(GHIElectronics.NETMF.Hardware.USBizi.Pin.IO20, true);
}
}
}
this time it says "Hardware does not exist in GHI…NETMF namespace …
Ah!!! I was assuming that was the case in which “using” referenced it, now i know!! Pablo and all the others thank you for the assistance and your persistence .
‘Adding a reference’ means telling the IDE that your project will be using some external code.
Adding a ‘Using directive’, i.e.
using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.Hardware;
…tells the compiler that THIS file will be using those namespaces.
A ‘reference’ is a DLL that may contain one or more namespaces, so it is not enough to do just one or the other of the steps above. You have to tell Visual Studio where the external dll is that you want to add to the project (adding a reference) and you also have to tell it which namesopaces you will be using in each file.
Think of it like you have many file cabinets each containing many files. You can’t just tell someone to go get you a certain piece of paper, you have to tell them in which file cabinet (reference) and which file (namespace) to find that paper (bit of code you want to use.)
It was driving me cray for a while i was starting to resemble the cat in Jeff’s avatar. Its almost embarrassing how simple the solution was. anyhow thanks again.