Main Site Documentation

Accessing the on board LED


We’re 2 university students from Spain
We need to access the on board LED to make it blink but we don’t know how to reach it. We have a code that worked on a simulator but doesn’t work on the chipworkx board since we don’t know what direction (pin) should we point the class to, when constructing.

using System;
using System.Threading;
using Microsoft.SPOT.Hardware;
namespace GpioOutputPortSample
    public class Program
        public static void Main()
            OutputPort outputPort = new OutputPort(Cpu.Pin.GPIO_Pin0, true);
            while (true)
                outputPort.Write(!outputPort.Read()); //toggle port

Could you give us a hand? Also are there examples like this somewhere?



Already solved it. If anyone has the issue:

OutputPort led = new OutputPort((Cpu.Pin)ChipworkX.Pin.PC5,true);


Yes all LEDs/buttons should be marked on the board