ขาย US-025/A ultrasonic sensor module ราคาที่ดีที่สุด
0
การให้คะแนน
3
ขายแล้ว
฿40
เรือจาก | จังหวัดฉะเชิงเทรา |
---|
รายละเอียดสินค้า
US-025/A ultrasonic sensor module
The high-performance, low-cost ultrasonic ranging module is introduced; the module adopts the high-performance ultrasonic ranging chip CS100 of Suzhou Shunyu Zhilian; the ranging is up to 6 meters, the ranging accuracy is high; the measurement consistency is good, the ranging is stable. reliable.
The US-025/US-026 ultrasonic ranging module can realize non-contact ranging function of 2cm~6m, working voltage is 3V-5.5V, working current is 5.3mA, support GPIO communication mode, and work stably and reliably.
US-025 has the same performance as US-026, the same size and the same principle.
the difference:
US-025 uses a double panel, US-026 uses a single panel;
US-025 's 4Pin pin header is soldered on the front side (the probe side), US-026 is a single panel, the front side (the probe side) has no pad, and the pad is soldered on the back side (chip side).
Code:
// us-025 / us-026 high-precision ranging routines Unsigned int EchoPin = 2;
Unsigned int TrigPin = 3;
Unsigned long Time_Echo_us = 0;
// Len_mm_X100 = length * 100
Unsigned long Len_mm_X100 = 0;
Unsigned long Len_Integer = 0; //
Unsigned int Len_Fraction = 0;
Void setup ()
{
Serial. The begin (9600);
PinMode (EchoPin, INPUT);
PinMode (TrigPin, the OUTPUT);
}
Void loop ()
{
DigitalWrite (TrigPin, HIGH);
DelayMicroseconds (50);
DigitalWrite (TrigPin, LOW);
Time_Echo_us = pulseIn (EchoPin, HIGH);
If ((Time_Echo_us 60000) (Time_Echo_us 1))
{
Len_mm_X100 = (Time_Echo_us * 34) / 2;
Len_Integer = Len_mm_X100/100;
Len_Fraction = Len_mm_X100%100;
Serial. Print (" the Present Length is: ");
Serial. Print (Len_Integer, DEC);
Serial. Print (". ");
If (Len_Fraction 10)
Serial. Print (" 0 ");
Serial. Print (Len_Fraction, DEC);
Serial. Println (" mm ");
}
Delay (1000);
}