ข้อมูล
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
รายละเอียดสินค้า
US-016 ultrasonic sensor analog voltage output dual-range 

โมดูลวัดระยะทางแบบ Analog
Technical parameters
Working voltage: 5V DC
Working current: 3.8mA
Working temperature: 0~+70 degrees
Output mode: analog voltage (0~Vcc)
Induction angle: less than 15 degrees
Detection range: 2cm-300cm
Detection accuracy: 0.3cm+1%
Resolution: 1mm
The size of the module: 45mm*20mm*1.2mm.


Code:

#define rangePin 2   //define pin
#define outPin A0          
unsigned int ADCValue;  //initialize variable
 
void setup() {
  //set baud rate for communicating with the computer
  Serial.begin(9600);
  pinMode(rangePin, OUTPUT);  //set Pin 2 as output 
  //set Pin 2 low: range = 1m or set Pin 2 high: range = 3m
  digitalWrite(rangePin, LOW);  
                                
}
 
void loop() {
    ADCValue = analogRead(outPin);    //read the pin analog value
    //ADCValue *= 3;      //for range = 3m
    //show the distance
    Serial.print ( "Present Length is:");
    Serial.print (ADCValue, DEC);
    Serial.println ( "mm");
 
    delay (500); // delay 0.5S
}


เงื่อนไขอื่นๆ
Tags

วิธีการชำระเงิน

บมจ. ธนาคารกรุงไทย สาขาโรงไฟฟ้าบางปะกง ออมทรัพย์
ธนาคารกรุงเทพ จำกัด (มหาชน) สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
บมจ. ธนาคารกรุงไทย สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
พร้อมเพย์ สาขา- -
Scan this!
สนธยา ใจผ่อง
063-xxxxxx-8
Accept All Banks | รับเงินได้จากทุกธนาคาร
พูดคุย-สอบถาม