Hi there, I'm trying to solve the following problem:
I'm getting raw values from IMU by means of I2C. The values are binary (obviously), but Serial.println(val, DEC) can convert it to decimal and required values can be viewed on the serial monitor.
Now the question: how can I save these decimal values seen on serial monitor as a variable?
I'm confused. Why would you want to store the number in 'val' in the much less efficient form of a string of characters? Keeping numbers as numbers is usually the most efficient way to work with them.
Since the computer does math in binary, in order to "apply scaling factor" you would have to convert your string of digits back to binary. The conversion back and forth to character strings would take much longer than applying the scaling factor in binary.