I want to convert a float value like 26,4
into a byte array. Something like: [51,51,-45,65]
. Another example: 32,2
> [-51, -52, 0, 66]
.
I can do it in Arduino C++ and Python, but I don't see how to do it in JavaScript.
I have an input field in my HTML page where I want to write my float value and decode it before sending it to a Python script.
Is it possible?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With