I have a project that I require some help with.
I have a dashboard that I will be using as input to locate two linear actuators.
When I click the Width button (bWidth) t1 begins to blink with a cursor.
If I then click on the Height button (bHeight) the cursor in t1 stops and a cursor begins to blink in the t2.
All that is working fine. My two questions are:
- When I start inputting #’s, how do I tell them to populate the textbox that has the focus (blinking cursor)?
- Also, some help with moving the first pressed # into the tens column when a second # is pressed.
I am fairly competent on the Arduino side, but I’m a total NOOB with the Nextion display. This seems like a great forum, and I am grateful for what I’ve learned so far and I’m very appreciative of any help you can give me.
}else if tmW.en1
in the Touch Release Event of the “0” button doesn’t work.
You’ll need a variable to store which entry field, Width or Height, is active.
// Note: vaTxtLength.val limits the number of characters which
// can be entered. In my project, this can vary.
// Button 1 Touch Release Event
// Button 4 Touch Release Event
// Text box Touch Release Event. This deletes last digit entered
// OK button Touch Release Event
// Many if statements to write the entry back to the calling page/control.
// Some convert to numbers
if(va0.val==12)// Move: X-1 Count (Each page/control has an ID)
// Some store the text in EEPROM and send it to the MCU.
if(va0.val==224)// Rose:X Axial Amplitude
wepo pageRose.t6.txt,264 //Store value in EEPROM at 224-231
print "ã" // Ascii:227
printh FF // Custom serial end code
page pageRose // Return to calling page
Full code for Nextion is here: https://github.com/elfren/RoseEngine_SpindleAndAxis/tree/master/Nextion
Sorry for the late reply. Thank you, this will be very helpful.