[SquareLine Studio] ]Displaying Temperature and Pressure Values on CYD #234
amirzohaib
started this conversation in
General
Replies: 1 comment 2 replies
-
Hi amirzohaib, I'm new to this also but a little further along the learning experience. I write my values to the screen like this...
ui_PressReading & ui_TempReading are the names of the text field in SquareLine. I place this code in it's own function but it's called from the main function every 250ms after I poll the sensor for current readings. As for scheduling the writing of the values, you don't want to use delays. I'm using the Arduino IDE and I use millis() and an interval value. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I just began working on CYD and designed my own UI to display temp and pressure..etc
I have made Text fields and i thought i could just enter Variables as text and itll show the values
I somehow can't understand, how can i pass Sensor values to those fields, or manipulate a Bar graph etc..
since I can't link a variable in Square Line Studio.
After googling, I can see It's something like this
lv_label_set_text_fmt(ui_Label1, “%d”, data);
but where to put it in my code? In the Main function?
And usually I had a delay in my loop so that i don't get bombarded with values, but now there is a ticker 5ms in the loop for display, im not sure how i could refresh sensor values every 2 seconds if that ticker needs a 5ms refresh in the main loop
Thanks for any help, i really am new to this, the price was just unbeatable (7,65EUR incl. shipping for a CYD2USB) so i want to use it everywhere
Beta Was this translation helpful? Give feedback.
All reactions