Send Value from Input Number Box to Write Characteristic
Posted: 04:24, 01 Nov 2015
This seems like it should be simple, but I can't figure it out after much trial and error (my HTML/JS skills are sketchy at best).
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.
Don
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.
Don
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">