Download Tokopedia App
Tentang TokopediaMulai Berjualan PromoTokopedia Care
tokopedia-logo
Kategori
Atur jumlah dan catatan

Stok: Habis

Subtotal

-

Proximity Sensor Sharp GP2Y0A21 sensor jarak Arduino mikrokontroler

Rp65.000
    stock READY, barang sesuai foto pembeli mendapatkan : 1 sensor 1 kabelnya jadwal kirim bisa dibaca di catatan toko, harap dibaca dulu supaya tidak galau setelah bayar :) link library-nya (Arduino) : https://github.com/guillaume-rico/SharpIR contoh sketch demonya (harus sudah ada librarynya ya) : //---------------------------------------------------------------------------- #include #define ir A0 #define model 20150 // ir: the pin where your sensor is attached // model: an int that determines your sensor: 1080 for GP2Y0A21Y // 20150 for GP2Y0A02Y // (working distance range according to the datasheets) SharpIR SharpIR(ir, model); void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { delay(2000); unsigned long pepe1=millis(); // takes the time before the loop on the library begins int dis=SharpIR.distance(); // this returns the distance to the object you #39;re measuring Serial.print( #34;Mean distance: #34;); // returns it to the serial monitor Serial.println(dis); unsigned long pepe2=millis()-pepe1; // the following gives you the time taken to get the measurement Serial.print( #34;Time taken (ms): #34;); Serial.println(pepe2); } //--------------------------------------------------------------------
    Ada masalah dengan produk ini?

    ULASAN PEMBELI

    4.8/ 5.0

    100% pembeli merasa puas

    4 rating • 3 ulasan

    5(3)75%
    4(1)25%
    3(0)0%
    2(0)0%
    1(0)0%