Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Peter Cuellar
Created November 30, 2015

Distance Measuring Sensor Experimentation

Using the Sharp Proximity Sensor to

Showcase (no instructions)21
Distance Measuring Sensor Experimentation

Story

Read more

Code

Proximity Sensor

C/C++
int sensorPin = 0; //analog pin 0

void setup(){
  Serial.begin(9600);
}

void loop(){
  int val = analogRead(sensorPin);
  Serial.println(val);

  //just to slow down the output - remove if trying to catch an object passing by
  delay(100);

}

Credits

Peter Cuellar
10 projects • 2 followers
Designer, Engineer, Environmentalist
Contact

Comments

Please log in or sign up to comment.