ของน่าใช้ มีเรื่องราวให้ค้นพบรู้จัก Buydeestore
เซ็นเซอร์วัดระยะ อัลตราโซนิคเซ็นเซอร์ HC-SR04 3.3-5V 2 - 400 cm Ultrasonic Module แบบ Single Chip
Home Appliances

เซ็นเซอร์วัดระยะ อัลตราโซนิคเซ็นเซอร์ HC-SR04 3.3-5V 2 - 400 cm Ultrasonic Module แบบ Single Chip

เช็กราคาล่าสุดที่ร้านค้า

ราคา โปรโมชั่น และตัวเลือกสินค้าอาจเปลี่ยนแปลงที่ร้านค้าปลายทาง

ดูราคาและโปรโมชั่นล่าสุด

เราอาจได้รับค่าตอบแทนเมื่อมีการซื้อผ่านลิงก์นี้ คุณทำรายการซื้อขายกับร้านค้าปลายทางโดยตรง

สินค้านี้ตรงใจไหม?

บอกเราเพื่อช่วยปรับสินค้าที่แนะนำให้เหมาะกับคุณมากขึ้น

ข้อมูลสินค้าในที่เดียว อ่านประสบการณ์ก่อนเลือก เช็กเงื่อนไขจากร้านค้า

รู้จักสินค้านี้

เซ็นเซอร์วัดระยะ อัลตราโซนิคเซ็นเซอร์ HC-SR04 3.3-5V 2 - 400 cm Ultrasonic Module แบบ Single Chip รายละเอียดสินค้า - Working voltage: DC 3.3- 5 V - Static current: 3 mA - Working temperature: 0 ~ + 70 - Output interface: GPIO, I2C, UART, 1-wire - Induction Angle: Less than 15 - Detection range: 2 cm to 2 m @ 3V and 4 m @ 5V - Detecting precision: 0.3 cm + 1% - Sensor size: Approx. 45 x 20 x 1.6mm ตัวอย่าง Code พร้อมการต่อวงจร /* HC-SR04 Ping distance sensor] VCC to arduino 5v GND to arduino GND Echo to Arduino pin 13 Trig to Arduino pin 12 Red POS to Arduino pin 11 Green POS to Arduino pin 10 560 ohm resistor to both LED NEG and GRD power rail More info at: http://goo.gl/kJ8Gl Original code improvements to the Ping sketch sourced from Trollmaker.com Some code and wiring inspired by http://en.wikiversity.org/wiki/User:Dstaub/robotcar */ #define trigPin 13 #define echoPin 12 #define led 11 #define led2 10 void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(led, OUTPUT); pinMode(led2, OUTPUT); } void loop() { long duration, distance; digitalWrite(trigPin, LOW); // Added this line delayMicroseconds(2); // Added this line digitalWrite(trigPin, HIGH); // delayMicroseconds(1000); - Removed this line delayMicroseconds(10); // Added this line digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration / 2) / 29.1; if (distance 4) { // This is where the LED On/Off happens digitalWrite(led, HIGH); // When the Red condition is met, the Green LED should turn off digitalWrite(led2, LOW); } else { digitalWrite(led, LOW); digitalWrite(led2, HIGH); } if (distance = 200 || distance = 0) { Serial.println("Out of range"); } else { Serial.print(distance); Serial.println(" cm"); } delay(500); } วิดีโอตัวอย่างการใช้งาน
เรื่องเล่าจากชุมชน

ประสบการณ์จากผู้ใช้

เขียนรีวิว ↗

รายงานข้อมูลสินค้านี้

เป็นคนแรกที่เล่าประสบการณ์

ชอบอะไร มีข้อสังเกตตรงไหน? เรื่องเล่าของคุณช่วยให้คนอื่นเลือกได้ดีขึ้น