Skip to content

Instantly share code, notes, and snippets.

@JonDouglas
Created May 5, 2015 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonDouglas/42f0620a8667d975a41d to your computer and use it in GitHub Desktop.
Save JonDouglas/42f0620a8667d975a41d to your computer and use it in GitHub Desktop.
Simple Netduino Program
public class Program
{
public static void Main()
{
// configure an output port for us to "write" to the LED
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
// note that if we didn't have the SecretLabs.NETMF.Hardware.Netduino DLL, we could also manually access it this way:
//OutputPort led = new OutputPort(Cpu.Pin.GPIO_Pin10, false);
int i = 0;
while (true)
{
led.Write(true); // turn on the LED
Thread.Sleep(250); // sleep for 250ms
led.Write(false); // turn off the LED
Thread.Sleep(250); // sleep for 250ms
Debug.Print("Looping" + i);
i++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment