I want to have a number input box in an Evothings app that, upon clicking a SUBMIT button, would write that value to a BLE characteristic on my device. I've got a jQuery knob that can successfully write a range values as well as buttons that can successfully write individual values, but I can't get a number box to send an arbitrarily typed-in number to the device.
Below is some part-HTML, part-pseudo-code of what I am trying to do. Any suggestions would be most appreciated.
Code: Select all
<input type="number" id="ambTemp" min="65" max="81">
<input type="submit" onclick="some code here to send the value 'ambTemp' to the device">