Welcome to the community. Which socket you use depends on which eblock you’re connecting to the expansion module. For example, if you wanted to drive the Piezo eblock, you’d need to plug the expansion module into a P socket (which supports PWM), and plug the eblock into one of the pins that supports PWM. There’s a chart available of all of the Gadgeteer socket types, and which kinds of I/O they support:
In your case, LED can be driven by either digital I/O, or by PWM (if you wanted to dim the LED rather than simply turn it on or off), so you’d want either an X or Y socket for digital GPIO, or P for PWM. And you won’t be using the FEZ_Pin code, since this is Gadgeteer. Instead, check out the GT.Interfaces namespace, which should have what you need. Then you can use eBlockExpansion.SetupDigitalOutput, or SetupPWMOutput. Here’s a code sample that will blink the LED once a second:
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
public partial class Program
static GT.Interfaces.DigitalOutput LED;
// This method is run when the mainboard is powered up or reset.
LED = eBlockExpansion.SetupDigitalOutput(GT.Socket.Pin.Nine, false);
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
GT.Timer timer = new GT.Timer(1000);
timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
void timer_Tick(GT.Timer timer)
The above assumes that you have the Expansion module plugged into a digital I/O socket (I tested on Socket 3 on my Hydra, which supports Y), and that you’ve plugged the LED eblock into pin 9.
Hope that helps.