Associate III
August 14, 2021
Question
float values of array are not assigned during a for loop
- August 14, 2021
- 6 replies
- 4402 views
I want to convert a bunch of uint16_t values from an ADC into floating point voltages. For this I use a for loop to loop through the uint16_t array and write the values to a float array. But the float array remains 0 as if no assignment is ever made. Outside of the for loop the conversion works. And when I step through the program with the debugger, I see reasonable float values but they do not end up being written to the array. Why?
the temp float value is 1.847
the temporary index is 0
but the array at index 0 is not 1.847
