รหัสสินค้า | AS00596 |
หมวดหมู่ | LIDAR / เซ็นเซอร์วัดระยะทาง / ความเร็ว Distance / Speed |
ราคา | 1,850.00 บาท |
ดูรายละเอียดการใช้งานและตัวอย่าง arduino code ได้ที่ Click
Introduction
Specification
Features
Document:
Shipping List:
Applications
Num | Label | Description |
---|---|---|
Red line | VCC | power supply input positive pole |
Black line | GND | power ground wire |
Yellow line | RX | UART receiving data line |
white line | TX | UART transmitting data line |
1、communication instructions
Interface | Baud rate | Data bit | Stop bit | Check bit |
---|---|---|---|---|
UART | 115200bps | 8 | 1 | None |
2、Timing diagram
Note: T1 ≥ 19ms; T2 ≈ 13ms
3、UART output format
Frame data | Output data | Description | Bytes |
---|---|---|---|
Frame header | 0XFF | Frame header, fixed as 0XFF | 1 byte |
H_DATA | 0X07 | Higher 8 bits of distance data | 1 byte |
L_DATA | 0XA1 | Lower 8 bits of distance data | 1 byte |
SUM | 0XA7 | data checksum | 1 byte |
SUM= (header+Data_H+ Data_L)&0x00FF
=(0XFF + 0X07 + 0XA1)&0x00FF
=0XA7;
Distance value = DATA_ H * 256+DATA_L = 0x07A1;
Decimal conversion is equal to 1953;
Note: the sensor needs to be put into water to get data, otherwise the output distance value is 0
#include <SoftwareSerial.h>
unsigned char buffer_RTT[4] = {0};
uint8_t CS;
#define COM 0x55
SoftwareSerial mySerial(7, 8);
void setup() {
Serial.begin(115200);
mySerial.begin(115200);
}
void loop() {
mySerial.write(COM);
delay(100);
if(mySerial.available() > 0){
delay(4);
if(mySerial.read() == 0xff){
buffer_RTT[0] = 0xff;
for (int i=1; i<4; i++){
buffer_RTT[i] = mySerial.read();
}
CS = buffer_RTT[0] + buffer_RTT[1]+ buffer_RTT[2];
if(buffer_RTT[3] == CS) {
Distance = (buffer_RTT[1] << 8) + buffer_RTT[2];
Serial.print("Distance:");
Serial.print(Distance);
Serial.println("mm");
}
}
}
}
Results: Put the sensor into the water, and if there is an obstacle in front, the distance between the sensor and the obstacle will be printed by serial port.
ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
หน้าที่เข้าชม | 15,393,873 ครั้ง |
ผู้ชมทั้งหมด | 5,896,951 ครั้ง |
เปิดร้าน | 21 พ.ค. 2556 |
ร้านค้าอัพเดท | 17 ก.ย. 2568 |