I'm in the process of developing a webapp that needs to interact with an Arduino for its inputs in order to dynamically change the contents of the webpage.
Currently, I am experimenting with variables that I have created and assigned random numbers to since the project is still incomplete. However, my lack of experience with jQuery is hindering my progress as I am unable to make it function properly. For example, I have set the variable light = 100
and I would like to create an if
statement that will display the message: your plant is happy
when light > 100
.
I am unsure how to update the value solely based on the input of a variable without requiring any user interaction such as clicking on elements or buttons.