我尝试在Visual Studio 2015社区中运行诊断工具以进行测试项目.
我的代码:
#include<iostream>
int main()
{
for (;;)
{
std::cout << "Hello, World!";
getchar();
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我在配置Debug中使用x64平台.窗口诊断工具意外失败,说明如下:
诊断工具意外失败."输出"窗口中的"诊断中心"输出可能包含其他信息.
诊断中心:
暂存目录不能具有尾随连接点.
这是什么意思?如何更正此错误?
我使用pySerial有问题,我不知道从哪里开始寻找.我有一个64位Windows 7操作系统,Python 2.7.5(32位),pySerial和Arduino(Arduino正常工作)已经安装.
我的Arduino代码如下:
// the setup routine runs once when you press reset:
void setup() {
// initialize the serial in 19200 baud rate
Serial.begin(19200);
}
// the loop routine runs over and over again forever:
void loop() {
delay(1000); // wait for a second
Serial.print("hello");
}
Run Code Online (Sandbox Code Playgroud)
(Arduino在COM8中连接,使用串行监视器时我可以看到它敬礼)
我的PySerial代码如下所示:
import serial
import time
arduino = serial.Serial("COM8", 19200)
time.sleep(2)
while True:
print arduino.readline()
Run Code Online (Sandbox Code Playgroud)
当我启动这个脚本时,程序运行,但我看不到串行输出(我认为Python脚本中的配置是正常的,因为如果有什么东西 - 例如端口 - 是错误的,它会崩溃).
我不知道如何找到解决方案.你能帮助我吗?