Sparkfun 4 digit 7 segment & Gadgeteer

I’ve been trying to figure out how to make this work, but I am stumped. I am trying to set the value of a SparkFun 4x7 display. I have it plugged into ground, 3.3, and pin 5 (connected to RX) of an extender module, the wiring on the display end is fine because it works with a Panda II, so I know it is a code problem.

I have the extender plugged into socket 5 on a Cerberus, but I have no clue what I am doing wrong. I am not getting any errors, I’m just not seeing anything update on the display, it is stuck at the 0000 that it starts on. I would really appreciate help with my PICNIC issue.

        Socket s = Socket.GetSocket(this.extender.ExtenderSocketNumber, false, this.extender, "");
        SPI.Configuration cfg = new SPI.Configuration(s.CpuPins[5], false, 0, 0, false, true, 1000, SPI.SPI_module.SPI1);
        SPI spi = new SPI(cfg);
        byte[] buffer = { 0, 1, 2, 3 };

Is this the one you have?

I don’t see anything that says it’s a SPI display. Looking at the “Display Example Code” sample doesn’t show any SPI code. Maybe provide a link to the display if that’s not it. Follow their example if it is.

Doh, you are correct, I have no clue why I was thinking it was SPI, my Panda II code has it as serial. I quickly changed my code to use Serial and moved it to socket 2 after getting errors about the extender requiring a K or U socket, and now I am getting a new error. Any ideas?

An unhandled exception of type ‘System.ArgumentException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll on writing.

        Socket objSocket;
        objSocket = Gadgeteer.Socket.GetSocket(this.extender.ExtenderSocketNumber, true, extender, "");
        Gadgeteer.Interfaces.Serial gps = new Gadgeteer.Interfaces.Serial(objSocket, 9600, Gadgeteer.Interfaces.Serial.SerialParity.None, Gadgeteer.Interfaces.Serial.SerialStopBits.One, 8, Gadgeteer.Interfaces.Serial.HardwareFlowControl.NotRequired, extender);
        byte[] buffer = { 0, 1, 2, 3 };
        gps.Write(buffer, 0, 4); <---ERROR LINE

I was missing .Open(). I also needed to be on pin 4 of the extender not pin 5.

Thanks, I have it working now.