Detail JSN-SR04T Sensor Ultrasonic Waterproof Sensor Jarak Distance JSN-SR04T Waterproof Ultrasonic Sensor
Ready Foto Pertama, NEW VERSION! Lebih Stabil
Operating Voltage: 5V DC
Working Current: <8mA
Acoustic Emission Frequency: 40kHz
Maximum range: 600cm
Minimum range: 20cm
Connection pins: +5V, Trig, Echo, GND
Module Dimensions: 41mm * 28.5mm
Sensitivity: ~1cm
Measure Angle: 75 degree
Operating Temperature: -10 ~ 70 ℃
Storage Temperature: -20 ~ 80 ℃
Bisa menggunakan library NewPing, tinggal pilih NewPingExample
atau bisa coba program dibawah
//progam jsn/aj-sr04
#define ECHOPIN 12 //D2
#define TRIGPIN 11 //D3
void setup() {
Serial.begin(9600);
pinMode(ECHOPIN,INPUT_PULLUP);
pinMode(TRIGPIN, OUTPUT);
digitalWrite(ECHOPIN, HIGH);
}
void loop() {
digitalWrite(TRIGPIN, LOW);
delayMicroseconds(2); //2
digitalWrite(TRIGPIN, HIGH);
delayMicroseconds(15); //15
digitalWrite(TRIGPIN, LOW);
int distance = pulseIn(ECHOPIN, HIGH, 26000);
distance=distance/52; //58 ini untuk penyeuasian jika jarak salah
Serial.print(distance);
Serial.println(" cm");
delay(50);
}
Penggunaan mode I2C, SERIAL, ONE WIRE kami blm pernah coba
Gambar produk JSN-SR04T Sensor Ultrasonic Waterproof Sensor Jarak Distance JSN-SR04T Sensor Ultrasonic Waterproof Sensor Jarak Distance