This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to change the data type from integer to floating point so i can read floating ponit voltages on copper coap?

I have an iot/coap environment setup and i want to read input voltage connected to p0.01.I can read the input in terms of resolution(0-1023).I can convert this values to voltage(0-3).I want to read voltage in terms of floating point(1.0-3.3).How can i change the data type from int to float? image description I converted the input to voltage using formula in the image adc_buffer[0]=adc_buffer[0]*3.3/1023. I am using the code from this link devzone.nordicsemi.com/.../

Related