Marco2
September 7, 2010, 9:48am
1
Hi Guys, i’m trying to use MathEx class, everything is right for the next code:
Debug.Print(GHIElectronics.NETMF.System.MathEx.PI.ToString());
But if i try to use other functions like this:
Debug.Print(GHIElectronics.NETMF.System.MathEx.Floor(2.3).ToString());
I get the follow error:
An unhandled exception of type ‘System.NotSupportedException’ occurred in USBizi Application.exe
What is wrong with my code?
any help?
I’ve checked and those lines are working code.
Are you sure the error is on this exact line ?
Are you sure you have the latest firmware loaded along with the latest assemblies & VS2010 ?
Marco2
September 7, 2010, 11:00am
3
Yes I’m sure, that is the line that give me a error, the exact code is this:
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.System;
namespace testusbizi
{
public class Program
{
public static void Main()
{
Debug.Print( MathEx.Floor(2.4).ToString());
}
}
}
Anyway i will try reinstalling all the enviroment.
Thanks Bec a Fuel
User_5
September 7, 2010, 11:04am
4
Are you using the emulator? Are you sure this running on an actual hardware? See getting started guide.
Marco2
September 7, 2010, 11:06am
5
I’m using the default emulator, i guess. I’ll see getting started guide.
User_5
September 7, 2010, 11:07am
6
These are GHI extensions, they do not work on the emulator.
:wall: Didn’t think at that :
Marco2
September 7, 2010, 11:11am
8
ooh So i’ll need some hardware for to try this code?
There is also the option of extending the emulator so that it emulates the GHI math functions but that is quite involved.
Marco2
September 7, 2010, 11:17am
10
Ok guys, i understood, i’ll need the hardware.
Thanks for your help!