8Views0Replies

Author Options:

Sharp Ir sensor 4cm to 30cm Answered

Could anyone explain the code given in your example specifically the calculations.

volts = analogRead(IR)*0.0048828125; // (5/1024)
int distance = 13*pow(volts,-1);

Discussions