Main Site Documentation

Noob: J11D initialization puzzles me


#1

Had some problems with networking, and tried isolating the cause.

Now I dragged the J11D into the designer and typed one line, and got a bad exception on startup. What is wronge here?

I have the J11D module working in other examples, but I MUST know what the problem is here…


using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using GHI.Premium.Net;

namespace GadgeteerApp1
{
    public partial class Program
    {
        static readonly EthernetBuiltIn Eth1 = new EthernetBuiltIn();
        
        void ProgramStarted()
        {
                        
            Debug.Print("Program Started");
        }
    }
}

#2

@ andre.m - Wuaw quick reply, thanks.

I see your point. But I was aiming to remove the hardware-dependency in the code, and wanted to make my code portable (to ENC28 as well - if possible also wifi). Isn’t the EthernetBuiltin class a generic version of J11D?