Do you know the pulseIn() function of the Arduino environment?
The Arduino stores negative numbers in two's compliments too, so you can read in the value, extend to 32bit and convert it by pointer swapping or a union.
Do you know the pulseIn() function of the Arduino environment?
The Arduino stores negative numbers in two's compliments too, so you can read in the value, extend to 32bit and convert it by pointer swapping or a union.