Start a new topic

Arduino Button - Text Problem


I have a problem with my arduino and nextion 2.8" display.

I have a button attached to fifth pin of arduino. I t is PULL DOWN button.

I want to measure sensor value while press button. Finally I want to show on my nextion display. But I can not do it.

I can continously measure sensor value and send text editor of nextion display. But shown value in text editor continually change. Shown 0 and my sensor value always.

My code is below. How can I solve it? Thanks.



    char buffer[10];

    memset(buffer, 0, sizeof(buffer));

    int sensorValue = measureSensor(); // taken sensor output





1 Comment

I apologize that no one has answered your question until now.

This would have been a better topic in the Free Char section where users can assist with coding.

As this is not a Bug, and the age of the question, it is deemed historic and will be marked as solved.