


| รหัสสินค้า | C13 |
| หมวดหมู่ | วัดระยะทาง / ตรวจจับวัตถุ |
| ราคาปกติ | |
| ลดเหลือ | 130.00 บาท |
| สถานะสินค้า | พร้อมส่ง |
| ลงสินค้า | 23 มิ.ย. 2561 |
| อัพเดทล่าสุด | 22 ส.ค. 2568 |
| คงเหลือ | 40 ชิ้น |
| จำนวน | ชิ้น |
const int pingPin = 13;
int inPin = 12;
void setup() {
Serial.begin(9600);
}
void loop()
{
long duration, cm;
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
pinMode(inPin, INPUT);
duration = pulseIn(inPin, HIGH);
cm = microsecondsToCentimeters(duration);
Serial.print(cm);
Serial.print("cm");
Serial.println();
delay(100);
}
long microsecondsToCentimeters(long microseconds)
{
// The speed of sound is 340 m/s or 29 microseconds per centimeter.
// The ping travels out and back, so to find the distance of the
// object we take half of the distance travelled.
return microseconds / 29 / 2;
}



ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีด้านล่าง โดยลูกค้าสามารถโอนเงินหลังทำรายการสั่งซื้อได้ทันทีไม่ต้องรอยืนยัน
หลังจากโอนเงินแล้วสามารถแจ้งชำระเงินได้ที่ เมนูแจ้งชำระเงิน
หรือชำระเงินผ่าน PayPal โดยคลิกที่ ชำระเงินออนไลน์
| หน้าที่เข้าชม | 1,838,870 ครั้ง |
| ผู้ชมทั้งหมด | 807,870 ครั้ง |
| เปิดร้าน | 12 ธ.ค. 2558 |
| ร้านค้าอัพเดท | 1 พ.ย. 2568 |