2016-08-08 06:52 AM
Hello folks,
I am trying to implement magnetomter LIS3MDL with STM32F4. After reading the X, Y and Z axis register I am getting negative values as they are 2's complement. How can I transmit them on UART to see negative decimal value on hyperterminal ?2016-08-08 07:59 AM
How can I transmit them on UART to see negative decimal value on hyperterminal ?
How would you convert any binary representation into ASCII? If you couldn't figure out the negation and repeated division by 10, you could use things like or sprintf() and send the buffer. sprintf(buffer,''%d,%d,%d\n'', x, y, z);