Hi guys, I am using HG-C measurement sensor to measure the object. My sensor will detect the range from -35mm to +35mm. Here in the top of the sensor there is a range value but I have to display the same value in the 7 segment or serial monitor.
For that I am using the map function.
For example, `int samplse = analogRead(0); // read the input on analog pin 0
float val1 = (map(samplse,0,1023,-3500,3500)/100.0);`
But I am not getting the same value in the serial monitor. There is change in the value.
Can anyone help me?HG-C_Series.pdf (3.0 MB)