Newbie to Cerbuino...problem with first program getting the LED to work

Hello All,

After spending a lot of time with the Arduino system, I’ve finally moved on to using something half decent which is the Cerbuino board. However, I would like to get started and get programming with this.

I’ve tried a simple LED flashing program however I’m getting the following error message in my program.

It looks as if I have a problem with the GHI.OSHW.Hardware.dll but am not sure how to go about debugging this…

CAN YOU PLEASE HELP!!!

Also, I enclose the program that I’ve written.

ERROR:

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘Microsoft.SPOT.Emulator.Sample.SampleEmulator.exe’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI OSHW NETMF v4.2 SDK\Assemblies\le\GHI.OSHW.Hardware.dll’
‘Microsoft.SPOT.Emulator.Sample.SampleEmulator.exe’ (Managed): Loaded ‘C:\Users\Richard\AppData\Local\Temporary Projects\LEDBlink\bin\Debug\le\LEDBlink.exe’, Symbols loaded.
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (2) ####
#### Message:
#### GHI.OSHW.Hardware.RTC+Cerb::.cctor [IP: 001d] ####
An unhandled exception of type ‘System.NotSupportedException’ occurred in GHI.OSHW.Hardware.dll

[CODE]
using System;
using Microsoft.SPOT;
using System.IO;
using Microsoft.SPOT.Hardware;
using GHI.OSHW.Hardware;
using System.Threading;

namespace LEDBlink
{
public class Program
{
public static void Main()
{
OutputPort LED;

        LED = new OutputPort((Cpu.Pin)FEZCerbuino.Pin.Digital.LED1, false);
        
        while (true)
        {
            LED.Write(true);
            Thread.Sleep(1000);
            LED.Write(false);
            Thread.Sleep(1000);
        }
    }

}

}

[CODE]

Notes: I believe I’ve loaded the right assemblies and I’m using .NETMF 4.2 etc…

Thanks in advance,

Richard

I see RTC in the exception trace but on RTC in your code!

Maybe you have a mix of old and new SDK? If you had things installed from before then uninstall all and install again?

Does the LED blink or your application exists?

Welcome to the community.

The most common mistake is not having the latest firmware. Please make sure you have the latest SDK, see release notes. After installation, make sure you’ve loaded the latest firmware on the device. The firmware is updated though the integrated updater software found under the start menu. If that fails, or if your device doesn’t have such software, you can always run the update manually.

(Generated by QuickReply)

The most common mistake is assuming that the firmware you get matches the current SDK - so if nothing else, applying the firmware with the firmware updater that the SDK installs will make sure you’re using matched firmware and SDK versions (which is the critical point). That’s always what I would suggest as the first thing to do… and welcome to the forum!

Hello Gus and Brett,

Thanks for your replies. In answer to your question the Led program does not work. I installed the Sdk from the Gui links on the product page but uninstall and reinstall everything again as per the link. Will also update the firmware too.

In the meantime if anyone has a basic working led prig I can try that would be a great help.

Thanks again,

Rich.

Your program is fine. Try again please.

Also please follow the steps in the beginners guide ebook found on the support page.

@ User_rlatter

Did you switch the interface from emulator to USB?