Main Site Documentation

Using GHI.Premium.Hardware; -> 'System.Exception' in Microsoft.SPOT.Hardware.dll


#1

Hi,
In a program in c sharp for my Fez Cobra II, I wanted to use the concept RealClockTime. So I installed the proper libraries and references added to the program goes well.
Before I had:
using System;
using Microsoft.SPOT.Hardware;
using System.IO.Ports;
using GHI.Hardware.FEZCerb;
using System.Text;
using System.Threading;
using Microsoft.SPOT;

and so I now this:
using System;
using Microsoft.SPOT.Hardware;
using System.IO.Ports;
using GHI.Hardware.FEZCerb;
using GHI.Premium.Hardware;
using System.Text;
using System.Threading;
using Microsoft.SPOT;

Except that it makes me an exeption: An unhandled exception of type ‘System.Exception’ occurred in Microsoft.SPOT.Hardware.dll

And this is only the addition of using this GHI.Premium.Hardware;

Why? ^ ^


#2

Hi,
I think it has to do with the Statements

using GHI.Hardware.FEZCerb;

or

using Microsoft.SPOT.Hardware

I think the first is not needed since Cobra II does not belong to the Cerb Family
and there may be members with the same Name.


#3

Thank you for the answers,
for andre.m: it does not work
for RoSchmi and others: yes I’m stupid, it’s a FEZ Cerb40 ii


#4

The Cerb, at the present time, does not use the Premium library. It uses the OSHW library.

References should be to GHI.OSHW.Hardware


#5

Thank you !
Now it works.