Ultrasonic Range Detector Analog-Output Distance Sensor US-016 (2cm - 300cm)
-
RM17.00
- Product Code: US-016
- Availability: In Stock
Arduino UNO | US-016 |
---|---|
A0 | Out |
Blank - 3m GND - 1m |
Range |
5V | VCC |
GND |
GND |
1-meter range (return in low-voltage)
unsigned int ADCValue; void setup(){ Serial.begin(9600); } void loop(){ ADCValue = analogRead(0); Serial.print("Present Length is: "); Serial.print(ADCValue, DEC); Serial.println("mm"); delay(1000); //delay 1S }
3-meter range (return in high-voltage)
unsigned int ADCValue; void setup(){ Serial.begin(9600); } void loop(){ ADCValue = analogRead(0); ADCValue *= 3; Serial.print("Present Length is: "); Serial.print(ADCValue, DEC); Serial.println("mm"); delay(1000); //delay 1S }
Tags: Ultrasonic