-
-
Save JonDouglas/42f0620a8667d975a41d to your computer and use it in GitHub Desktop.
Simple Netduino Program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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