
Fast Shipping.
All orders delivered fast

Quality Products.
Products tested for quality

Secure Payments.
Pay online securely with ssl

Customer Support.
We answer all your questions
Weight | 3.5 kg |
---|---|
Dimensions | 44.5 × 18.9 × 13.5 cm |
This SHARP distance sensor bounces IR off objects to determine how far away they are. It returns an analog voltage that can be used to determine how close the nearest object is. Comes with 12″ long 3-JST interface wire. These sensors are good for short-range detection. For over 1 m distance, we suggest using sonar sensors
To use, connect black wire to ground, red wire to 5V and white wire to analog input. The analog voltage out will range from 3V when an object is only 4″ (10 cm) away and 0.4V when the object is 32″ (80 cm) away.
Program for Module:
#define sensor A0 // Sharp IR GP2Y0A41SK0F (4-30cm, analog) void setup() { Serial.begin(9600); // start the serial port } void loop() { // 5v float volts = analogRead(sensor)*0.0048828125; // value from sensor * (5/1024) int distance = 13*pow(volts, -1); // worked out from datasheet graph delay(1000); // slow down serial port if (distance <= 30){ Serial.println(distance); // print the distance } }
Only logged in customers who have purchased this product may leave a review.
All orders delivered fast
Products tested for quality
Pay online securely with ssl
We answer all your questions
Official Online Component online store. Get the best quality components for your next project with us.
No account yet?
Create an Account
Reviews
There are no reviews yet.