Navio Remote Control input hardware device.
Navio provides RC (receiver) input via a connector on it's servo rail mapped to GPIO pin 4. Navio+ has a logic level converter and you can connect receivers which generate both 3.3V and 5V signals. The older Navio model only has a built-in voltage divider in PPM Input that lowers the voltage level from 5V to 3.3V. So if you connect a 3.3V PPM device (which is rare) to the original Navio, no signal will not be detected.
Inheritance: DisposableObject
コード例 #1
0
 /// <summary>
 /// Creates an instance.
 /// </summary>
 public RCInputTestUIModel(TaskFactory uiThread)
     : base(uiThread)
 {
     // Initialize device
     Device = new NavioRCInputDevice();
     Device.ChannelsChanged += OnChannelsChanged;
 }
コード例 #2
0
        /// <summary>
        /// Executes the task.
        /// </summary>
        public void Run(IBackgroundTaskInstance taskInstance)
        {
            // Create the RC input device
            using (var rcInput = new NavioRCInputDevice())
            {
                // Log start
                Debug.WriteLine("Navio RC input test start.");

                // Start receiving frames
                Debug.WriteLine("Waiting for valid PWM frames...");
                rcInput.ChannelsChanged += OnChannelsChanged;

                // Wait forever (this background task has no GUI)
                rcInput.Stopped.WaitOne();
            }
        }