Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unity3d 将串行数据发送到Lightblue Bean(一个可扩展的arduino)_Unity3d_Arduino_Serial Port_Bluetooth Lowenergy_Android Bluetooth - Fatal编程技术网

Unity3d 将串行数据发送到Lightblue Bean(一个可扩展的arduino)

Unity3d 将串行数据发送到Lightblue Bean(一个可扩展的arduino),unity3d,arduino,serial-port,bluetooth-lowenergy,android-bluetooth,Unity3d,Arduino,Serial Port,Bluetooth Lowenergy,Android Bluetooth,我在做一个团结项目。在我的项目中,我只想将颜色信息发送到Lightblue Bean(一种低能蓝牙Arduino)以控制灯光颜色 我试图通过SerialPort sp=new SerialPort(“/dev/cu.LightBlue Bean”)将串行数据从Unity发送到Bean;但它给出了以下错误: IOException: Inappropriate ioctl for device 我正在考虑使用/dev/cu.Bluetooth传入端口,但当时我无法启用使用虚拟串行(/dev/cu

我在做一个团结项目。在我的项目中,我只想将颜色信息发送到Lightblue Bean(一种低能蓝牙Arduino)以控制灯光颜色

我试图通过
SerialPort sp=new SerialPort(“/dev/cu.LightBlue Bean”)将串行数据从Unity发送到Bean;但它给出了以下错误:

IOException: Inappropriate ioctl for device
我正在考虑使用
/dev/cu.Bluetooth传入端口
,但当时我无法启用使用虚拟串行(/dev/cu.lightbluebean)功能

然后我尝试从Unity读取所有串行端口名。但是
ports.Length
始终为零。(下面列出了代码):

string[]port=SerialPort.GetPortNames();
Debug.Log(ports.Length);
对于(int i=0;i