In diesem Artikel erfahren Sie, wie Sie das Intel Edison-Board mit der RealSense 3D-Kamera teilen. Wir werden zwei Anwendungen erstellen, eine verwendet eine Intel RealSense 3D-Kamera für die Gestenanalyse und eine Intel Edison-Karte zum Umschalten der LEDs auf der Karte. Die zweite Anwendung verwendet die Intel Edison-Karte zum Empfangen von Daten von Temperatursensoren und Intel RealSense zum Synthetisieren von Sprache zum Lesen von Temperaturinformationen., , , . , « », IoT (Internet of Things). IoT , , . IoT- , , , , . , .
Intel Edison Intel Quark , , .
Intel Intel RealSense. RealSense 3D SDK, , , , , . , . Intel Edison, , .
:
- Intel Edison Arduino-
- Seeed Grove* – Starter Kit Plus — Intel IoT Edition
- 4- (Haswell ) Intel Core
- Microsoft Windows 8.1 (64-bit)
- 8
- USB 3.0
- Intel RealSense 3D F200 ( )
- () - Intel NUC (Next Unit Computing) Intel Core 4-
:
Intel RealSense SDK?
Intel RealSense SDK , , , , , , , 3D . SDK Microsoft .NET framework, Unity Pro 4.1.0 , Processing 2.2.1 JDK 1.7.0_11 . .NET C#.
, RealSense, , , , , Intel Capture and Share, .
Intel RealSense Intel 
.
SDK.
Intel Edison . IoT-, .
Intel Edison Intel Atom SoC, 22 500 . 40 GPIO (- ) 1 LPDDR3 , 4 EMMC -, Wi-Fi, Bluetooth .
Linux. , Linux.
Linux Arduino Linux . , Arduino . , .
Intel Edison 
.
Arduino-
Arduino- . -, , -. -, Arduino. , Arduino Intel Edison. Intel Edison Arduino-.

Grove Starter Kit Plus
«Grove Starter Kit Plus – Intel IoT Edition». Intel Galileo gen 2. , Intel Edison Arduino-.
, , . Arduino . -, . , , .
.
Seeed Studios, «Grove Kit» . 
«Sketchbook Starter». 
Wiki-:

Intel RealSense 3D F200
Intel RealSense 3D , , , . 3D , IoT ( Sense). USB 3.0 Intel Core 4- (Haswell) 8 .
HD 1080p , 3D . 
.

– Intel NUC Intel Core 4-
Intel NUC (Next Unit Computing) , RealSense 3D Intel Edison. , . , , ( Intel RealSense 3D) Intel Edison USB . , , , , Intel Edison, , , . , Intel Edison, Intel NUC, , , RealSense SDK.
RealSense USB 3.0, 8 Intel Core 4- , Intel NUC . , HDMI . , Intel NUC .
Intel NUC 
.

:
- Intel RealSense 3D Intel Edison.
- , Intel Edison Intel RealSense SDK.
Arduino IDE Intel IoT
Arduino IDE, . 1.6.0 
.
Intel Edison
Intel Edison. «Driver Software» ( 1.2.1). «
Getting Started Guide»:
Visual Studio
Visual Studio , . Intel RealSense SDK Visual Studio Windows 8.1. Visual Studio C, C++, VB.NET, C#, F#, M, Python*, Ruby, JavaScript* . #.
Visual Studio Express Edition Visual Studio Community. Visual Studio 
DreamSpark BizSpark .
Visual Studio 
. C# 
.
Intel RealSense SDK
Intel RealSense SDK 3D . 4.0.0.112526 ( Gold R2 release) 
.
Intel Edison
, , , , Blink. 
Arduino IDE, examples -> 01.Basics -> Blink.
Visual Studio Intel RealSense SDK
Visual Studio . Intel RealSense SDK 3D- USB 3.0. , Intel RealSense SDK Sample Browser , C++ C#. . «Hand Viewer».
SDK, «F200 Depth Camera Manager». 
. , .

1. RealSense 3D Intel Edison
, , .
Intel Edison
. Grove Arduino-, (LED socket kit v1.3) D2.

USB- Intel Edison - Intel NUC. Windows Device Manager, Intel Edison. , «COM16». Windows , .

Arduino IDE, Tools->Board «Intel Edison».

Tools -> Port «COM16».

, , . , , 1 – , 0 – .
const int ledPin = 2;     
void setup() {
  
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}
void loop() {
  if (Serial.available()>0) 
  
  {
    int tmp = Serial.parseInt();
    if(tmp == 0)
    {
      
      digitalWrite(ledPin, LOW);
    }
    else if (tmp == 1)
    {
        
        digitalWrite(ledPin, HIGH);
    }
  }
}
Intel Edison.
Intel RealSense
C# F200, «Hand Viewer». RSSDK/FF_HandsViewer.cs. , .
(spreadfingers). , .

MainForm.cs . , . , . UpdateInfo , . status, , “spreadfingers”. , 1 . , 0, .
using System.IO.Ports;
…
public partial class MainForm : Form 
{
	private SerialPort _serialPort;
private int _lastGesture;
	…
public MainForm(PXCMSession session) 
{
	…
	_serialPort = new SerialPort();
_serialPort.PortName = "COM16"; 
            _serialPort.BaudRate = 9600;
            _serialPort.ReadTimeout = 500;
            _serialPort.WriteTimeout = 500;
}
private void WriteToSerialPort(int value)
{
            if (_lastGesture != write)
            {
                Console.WriteLine(write.ToString());
                _serialPort.Write(write.ToString());
            }
            _lastGesture = write;
}
public void UpdateInfo(string status,Color color)
{
…
            if (status.Contains("spreadfingers") || status.Contains("spreadfingers"))
            {
                WriteToSerialPort(1);
            }
            else
            {
                WriteToSerialPort(0);
            }          
 }
private void Start_Click(object sender, EventArgs e)
{
    …
    _serialPort.Open();
}
private void Stop_Click(object sender, EventArgs e)
 {
     …
     _serialPort.Close();
 }
, . , .

2. Intel Edison Intel RealSense
, Intel Edison , Intel RealSense, .
Intel Edison
Temperature sensor v1.1 Grove , A0 . Arduino . 15 , . , . , , .
#include <math.h>
int a;
float temperature;
int B=3975;                  
float resistance;
void setup()
{
  Serial.begin(9600);  
}
void loop()
{
  a=analogRead(0);
  resistance=(float)(1023-a)*10000/a; 
  temperature=1/(log(resistance/10000)/B+1/298.15)-273.15;
  Serial.print("Current temperature is ");
  Serial.print(temperature);
  Serial.println(" celcius");
  delay(15000);
}
Intel RealSense
«Common Samples» «Speech Synthesis». , «Hand Viewer». , , . «COM16».
MainForm.cs .
using System.IO.Ports;
…
public partial class MainForm : Form 
{
        private SerialPort _serialPort;
        private static bool _continue;
        protected static string curr_module_name;
        protected static uint curr_language;
        protected static int curr_volume;
        protected static int curr_pitch;
        protected static int curr_speech_rate;
        Thread readThread = new Thread(Read);
        static public void Read()
        {
            while (_continue)
            {
                try
                {
                    string message = _serialPort.ReadLine();
                    Console.WriteLine(message);
                    VoiceSynthesis.Speak(curr_module_name, (int)curr_language, message, curr_volume, curr_pitch, curr_speech_rate);
                }
                catch (TimeoutException) { }
            }
        }
        public MainForm(PXCMSession session)
        {
            …
            _serialPort = new SerialPort();
            _serialPort.PortName = "COM16"; 
            _serialPort.BaudRate = 9600;
            _serialPort.ReadTimeout = 500;
            _serialPort.WriteTimeout = 500;
	
            _serialPort.Open();
            _continue = true;
            readThread.Start();
        }
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            _continue = false;
            readThread.Join();
            _serialPort.Close();
        }
        …	
}
, 15 . , , . VoiceSynthesis.cs VoiceOut.cs .
, . , AntiSnoozer (). Intel RealSense 3D , Intel Edison, , . . , ?