I have an Arduino mega linked to a nextion screen.
I'm trying to write 2.34 to NexNumber, but just writing 2
I use n2.setValue (bar)
can you help?
I don't like using the modulo as it does have some inaccuracies. BUT long way that will work
Could be a shorter way.
with numeric va0 for whole numbers and numeric va1 for fractional portions
and string va2 for string whole numbers and string va3 for string fractional part
add a hotspot an in Touch Press Event add
change width and height of hotspot to be small and out of the way where no one thinks to click
multiply your value by 100 before sending:
Or you probably could do the conversion in your MCU so 2.34 becomes text "2.34" and send