Main Site Documentation

Reports with release 2014 R2-Beta1


Please read the news announcement, linked below, and post all feedback on this thread.

News Announcement:

Tip: We would like to keep all reports contained in this one thread. Please continue to use this thread for any reports you may have on NETMF and Gadgeteer package 2014 R2-Beta1.


Documentation glitches:

  1. RuntimeLoadableProcedure.Region count: "The nubmer of regions in the ELF image. "
  2. RuntimeLoadableProcedures.SymbolType Enumeration: "A function or function. " A what or what? :slight_smile:


Another one: RuntimeLoadableProcedures.EflImage


Please consider:

  1. Renaming GHI.Utilities.Arrays.Extract[b]Value/b to GHI.Utilities.Arrays.Extract[b]Float/b;
  2. Adding GHI.Utilities.Arrays.Extract[b]Int32/b;


@ Simon from Vilnius - we will owe you a beer after all this help :slight_smile:


Noted! :wink:


What’s the point of GHI.Utilities.Arrays.ExtractValue when we have BitConverter now?


[em]Feature request:[/em] I would like to be able to covnert between Pin and PWMChannel, AnalogChannel and AnalogOutputChannel using GHI.Pins. I would love to see something like this to work:

Dim PWM6 As Cpu.PWMChannel = CType(Pin.P3_24, Cpu.PWMChannel)


Tried running my Cerberus application on G400… Total failure.

  1. Can’t find Moisture module in the toolbox.
  2. TempHumidity module is there, but if I add it, generator adds wrong text in program.generated.cs:

Changing to this one fixes the problem:

```cs] private Gadgeteer.Modules.GHIElectronics.TemperatureHumidity temperatureSensor;[/code

3. DisplayN18 shows scrambled images (see attached).
4. It seems it can't get IP address from DHCP anymore, but I need more testing here...

Should I paste the code? I do not want to polute this thread with a huge post...


Time for CAN time, huh? :slight_smile:

If there are no messages received, .ReadMessages() throws an ArgumentException, which is a) totally unrelated b) totally not expected (if there are no messages, I expect to get a zero-length Message[] buffer):

var can1 = new ControllerAreaNetwork(ControllerAreaNetwork.Channel.One, ControllerAreaNetwork.Speed.Kbps1000);
can1.ErrorReceived += (sender,e)=>{};//do nothing
can1.MessageAvailable += (sender, e) => { };//do nothing
can1.Enabled = true;
var messages = can1.ReadMessages(); //<-- throws ArgumentException, a zero length buffer would be correct behaviour


Feature request:

  • add Timings property to ControllerAreaNetwork class, which shows the current CAN bit timings. Makes sense since there’s a constructor overload accepting Timings structure.


I think Simon should apply to work at GHI in the QA department.
Great work!


Hah, now that would be ironic 8)


Getting this error on touch released on the cp7 with the fez raptor.

A first chance exception of type ‘System.NullReferenceException’ occurred in mscorlib.dll
Error invoking method “Gadgeteer.Modules.GHIElectronics.DisplayCP7+TouchEventHandlerTouchReleased” (check arguments to Program.BeginInvoke are correct)

Here is a simple example that will recreate the problem.

namespace GadgeteerApp4
    public partial class Program
        private Point last = new Point(0, 0);
        private bool touched = false;
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
            Glide.FitToScreen = true;

            this.displayCP7.ScreenPressed += (a, b) => display_CP7_ScreenPressed(a, b);
            this.displayCP7.ScreenReleased += (a) => display_CP7_ScreenReleased(a);

        public void display_CP7_ScreenPressed(DisplayCP7 sender, DisplayCP7.TouchStatus touchStatus)
            if (touchStatus.numTouches <= 0 || GlideTouch.IgnoreAllEvents)

            Point touch = new Point(touchStatus.touchPos[0].xPos, touchStatus.touchPos[0].yPos);

            if (this.touched)
                if (this.last.X != touch.X || this.last.Y != touch.Y)
                    GlideTouch.RaiseTouchMoveEvent(sender, new TouchEventArgs(touch));
                //GlideTouch.RaiseTouchDownEvent(sender, new TouchEventArgs(touch));

                this.last.X = touch.X;
                this.last.Y = touch.Y;
                this.last.X = touch.X;
                this.last.Y = touch.Y;
                this.touched = true;

                GlideTouch.RaiseTouchDownEvent(sender, new TouchEventArgs(touch));

        public void display_CP7_ScreenReleased(DisplayCP7 sender)
            this.touched = false;

            GlideTouch.RaiseTouchUpEvent(sender, new TouchEventArgs(this.last));

Additionally I attempted to convert the cp7 driver to use software i2c rather than native i2c. i2cbus.execute is failing with an index out of range exception on software i2c, as it attempts to enumerate the read write operation array. I’ll be building the core from the source this afternoon and attempt to find a solution to these two problem.


OK i figured out the problem with ScreenReleased events.

Change this:

if (!bSentReleased)
                    if (this.onScreenReleased == null)
                        this.onScreenReleased = new TouchEventHandlerTouchReleased(this.onScreenReleased);

                    if (Program.CheckAndInvoke(ScreenReleased, this.onScreenReleased, this))

                    bSentReleased = true;

To this:

if (!bSentReleased)
                    if (this.onScreenReleased == null)
                        this.onScreenReleased = new TouchEventHandlerTouchReleased(GenericScreenEvent);

                    if (Program.CheckAndInvoke(ScreenReleased, this.onScreenReleased, this))

                        bSentReleased = true;

In OnTouchEvent in the cp7 driver.
Where GenericScreenEvent is an empty function. The dispatcher doesn’t like null values.
The same will need to be done for the gesture handler and menu buttons in the same function.


Consider changing public static field

to a property wirh better name, for example:



When I attempt to upgrade a Gadgeteer Spider from 4.1 to 4.3, I am unable to get the port to work on my device.

If I need to get a power supply for the device, which one should I get? It looks pretty standard, but GHI doesn’t appear to have one specifically for the Gadgeteer that I can order.


Under 4.2 I would connect to the network like this:


            AddHandler ethernet_ENC28.Interface.NetworkAddressChanged, AddressOf ethernet_ENC28_NetworkAddressChanged
            AddHandler ethernet_ENC28.Interface.CableConnectivityChanged, AddressOf ethernet_ENC28_CableConnectivityChanged

In 4.3 how would I do this?



@ rockybooth - In 4.3 just initialize the module. The assignment to the network stack is now handled for you.


Thanks @ James

Here is what I am trying (unsuccessfully)

       Private Function startNetwork() As Boolean
            If Not ethernetENC28.Interface.Opened Then
            End If

            If ethernetENC28.Interface.CableConnected = False Then
                Debug.Print("Cable DISCONNECTED  ")
                Return False
            End If

            If Not ethernetENC28.Interface.NetworkInterface.IsDhcpEnabled Then
            End If
            Do While ethernetENC28.Interface.NetworkInterface.IPAddress = ""
                Debug.Print("IP Address: " & ethernetENC28.Interface.NetworkInterface.IPAddress.ToString)
                Debug.Print("Network connected = " & ethernetENC28.IsNetworkConnected.ToString)
                Debug.Print("Is network up? " & ethernetENC28.IsNetworkUp.ToString)
            Debug.Print("Network connected" & ethernetENC28.Interface.NetworkInterface.IPAddress)

            Return True
        End Function

I am simply trying to open a DHCP connection, and verify that a valid IP address has been granted.
I had quite a bit of trouble with this in 4.2, and it seemed somewhat particular to my router. In response you folks gave me a special build of 4.2 as described here:

I have been keeping my fingers crossed that this fix had been baked into 4.3. Of course, with the revised syntax, I may have the initialization wrong.