我想在Nextion HMI中以文本形式显示我的值,但是在编译过程中在代码中使用itoa函数时总是出错。我错过了什么吗?
#include "Nextion.h"
NexText P0t3 = NexText(0, 9, "t3");
const int reflectiveSense = A0; //assigning sensor value to A0
char SensorPV[10] = {};
void setup() {
// put your setup code here, to run once:
nexInit();
pinMode(reflectiveSense,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
P0t3.setText(itoa(analogRead(reflectiveSense), SensorPV, 10));
}