我不知道为什么 Qt 将这个输出给我。代码编译成功,所有语法格式正确。我曾尝试查看不同的论坛帖子,但无法查明错误。
我目前正在用面包板、电路和灯泡进行测试;所有硬件都正常工作,我能够在 Arduino 软件中捕获电压(如果需要,我可以添加 Arduino 代码)。
我遇到的问题是我无法在 Qt 中显示电压。我正在使用 Arduino Uno 和 Arduino 电压传感器(VCC <25V)。
电压传感器.pro
QT += core gui serialport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = voltage_sensor
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your …Run Code Online (Sandbox Code Playgroud)