使用QT 制作串口助手 以及Arduino测试程序
QT程序:
链接:https://pan.baidu.com/s/1Ia6nFqBSbe-m_uPcuj_vTg
提取码:jx84
Arduino测试程序:
int voltmeterInput = A5;
double voltmeterValue;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
voltmeterValue = 0;
voltmeterValue = analogRead(voltmeterInput);
delay(500);
//Serial.print("电压:");
//Serial.println(voltmeterValue);
//Serial.print("=");
//Serial.println(5 * voltmeterValue / 1023);
while(Serial.available())
{
Serial.println(Serial.read());
}
}