![:)](http://forums.netduino.com/public/style_emoticons/default/smile.png)
Design:
![Posted Image](http://farm5.static.flickr.com/4132/5100146177_4f193d9bc6.jpg)
On the breadboard:
![Posted Image](http://farm5.static.flickr.com/4149/5100748642_82a9ac6275.jpg)
How it works:
http://www.youtube.com/watch?v=YG4yLwIarb4
Code:
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace ShutterRelease { public class Program { static Boolean status = false; public static void Main() { // write your code here OutputPort focus = new OutputPort(Pins.GPIO_PIN_D8, false); OutputPort shutter = new OutputPort(Pins.GPIO_PIN_D10, false); InterruptPort button = new InterruptPort(Pins.ONBOARD_SW1, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeHigh); button.OnInterrupt += new NativeEventHandler(button_OnInterrupt); while (true) { if (status) { focus.Write(true); shutter.Write(true); Thread.Sleep(10); focus.Write(false); shutter.Write(false); Thread.Sleep(5000); } } } static void button_OnInterrupt(uint data1, uint data2, DateTime time) { status = !status; } } }