Paul_F
June 25, 2011, 12:11pm
1
I’ve been looking at the code for a 4 digit 7 segment display driver here:
[url]http://code.tinyclr.com/project/99/sparkfun-4-digit-7-segment-serial-display-driver/[/url]
The code has a reference to a
SerialPort
type, which I can’t find in any of the Microsoft or GHI libraries. Anyone know where this is?
Also looking at the following code:
Serial4DigitLED mySLED = new Serial4DigitLED("COM1", 9600);
Does the above mean this driver needs to be used with a COM port? I couldn’t find anything on the FEZ Panda or Connect shield labeled COM, so anyone know what ports I’d use here?
Add a reference to Microsoft.SPOT.Hardware.SerialPort.
Paul_F
June 25, 2011, 1:19pm
3
Eric, I couldn’t find it there… see image… am I missing something?
Paul_F
June 25, 2011, 1:22pm
4
Eric - please disregard last message. I see you have to add an actual assembly, not just look in the other one…
Paul_F
June 25, 2011, 1:38pm
5
now i’m getting an
InvalidOperationException
when I try to open the
SerialPort
.
Also, how should I connect the wires/pins?
Paul_F
June 25, 2011, 1:52pm
6
The stack trace from the exception:
System.IO.Ports.SerialPort::HandlePinReservations
System.IO.Ports.SerialPort::Open
SimpleConsole.Drivers.Serial4DigitLED::.ctor
SimpleConsole.Program::Test4DigitLED
SimpleConsole.Program::Main
Paul_F
June 25, 2011, 1:59pm
7
I figured it out after looking at someone else who had a similar issue:
[url]Ckiszka - Viewing Profile - Netduino Forums
I had been using Di1 for something else. The solution was to change that port, because COM1 needs both Di0 and Di1.
It’s working now.