how to send a signal to run a machine using netduino?

落爺英雄遲暮 提交于 2019-12-12 00:23:04

问题


first, i am a beginner in Netduino and micro-framework, so this is my situation : i have an application (winforms app) in a Win Pad this application it for sleeping detection, and i have a Netduino cart, what i want it's send a signal(start/stop) from my Netduino to the car window, that mean if the signal is sent the window is coming down and if it's sent for the second time the window is coming up. i am already see an example of LED :

  public static void Main()
    {
    var led = new OutputPort(Pins.GPIO_PIN_D0, false);

    while (true)
    {
        led.Write(!led.Read());
        Thread.Sleep(1000);
    }
    }

so please if someone has any idea i will be very appreciative.

Update : this is my code it very basic and i wondered if it's correct.

        OutputPort CarWindow = new OutputPort(Pins.GPIO_PIN_A0, false);
        while (true)
        {
            CarWindow.Write(true);//open the window
            Thread.Sleep(2000);

        }

来源:https://stackoverflow.com/questions/16623915/how-to-send-a-signal-to-run-a-machine-using-netduino

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!