There are lots of guys here asking for help, but i want to beg and plead for a quick and simple solution that i and my limited knowledge can make sense off. My business literally depends on it as i am only using nextion and arduino from here onwards. Please please help.
So I went ahead and got the nextion display that will now run my project. I am using the arduino mega for this project.
My project has a screen that control an “arm” and a “head” that weighs stuff.
The arm moves back and forth and the “head” got a loadcell measuring the weight suspended from it.
The screen should show how much the arm moved and how much tension is on the loadcell.
Both these values and the values I input should be stored in variables, so that i could use this in the arduino to do stuff. When there is to much tension on the loadcell, the motor will automatically turn 1 way, if not enough weight, motor turn the other way. Arm simply should go where i tell it to, also by a variable.
I got the screen going so that i could use the “+” & ”-” buttons to “set” a value, and the screen should show me the “actual” value as well. I will include the code and a pic of what the screen looks like.
Like i said + and – buttons changes the values on screen. These values i want to use to drive to motors. That's not a problem, i simply need to write these values into 4 variables i could use later to do so.
armAngleSet – textbox on nextion with value (degrees) what it should be.
armAngleAct - textbox on nextion with actual value (degrees).
tensionSet - textbox on nextion with value (kg) what it should be.
actTension - textbox on nextion with actual value (degrees).