HC-SR04 Ultrasonik Mesafe Sensörü

31,20 TL
stoktanteslim.png (4 KB)
hizlikargo.png (4 KB)

HC-SR04 ultrasonik mesafe sensörü, ses dalgalarıyla mesafe ölçümü yapan, düşük maliyetli ve yüksek doğruluğa sahip bir sensördür. Arduino, Raspberry Pi ve benzeri mikrodenetleyici platformlarıyla uyumludur. Robotik projeler, engelden kaçan araçlar, sıvı seviyesi ölçümü ve akıllı park sistemlerinde sıkça kullanılır.

 

Teknik Özellikler:

  • Çalışma Voltajı: 5V DC

  • Çalışma Akımı: 15 mA

  • Frekans: 40 kHz

  • Algılama Mesafesi: 2 cm – 400 cm (0.02 m – 4 m)

  • Hassasiyet: ±3 mm

  • Çıkış Sinyali: Dijital (TTL)

  • Trig ve Echo pinleri:

    • Trig: Ölçüm başlatma (giriş)

    • Echo: Mesafe bilgisi (çıkış)

  • Algılama Açısı: Yaklaşık 15°

  • Boyutlar: 45 mm x 20 mm x 15 mm

  • Bağlantı Pinleri: VCC, Trig, Echo, GND

 

Kullanım Alanları:

  • Robotik sistemlerde engel tespiti

  • Mesafe ölçüm uygulamaları

  • Sıvı seviyesi ve doluluk kontrolü

  • Güvenlik ve alarm sistemleri

  • Akıllı park sensör sistemleri

  • Otomatik musluk veya dezenfektan sistemleri

 

Notlar:

  • Doğru ölçüm için sensör yüzeyinin karşısı düz ve yansıtıcı olmalıdır.

  • Ölçüm doğruluğu için ani hareketlerden kaçınılmalı ve sensör sabitlenmelidir.

  • Arduino ile doğrudan kullanılabilir, yaygın kütüphaneler mevcuttur.

', PRODUCT_TYPE: '1', // id or code GTAG_CURRENCY_TYPE: 'currency', SEND_MEMBER: 'true', GTAG_PRICE_WITH_TAX: parseInt('1'), }, config: { optimize_id: '' }, setParams: () => { for (const [key, value] of Object.entries(GTAG_APP.params)) { GTAG_APP.params[key] = value === '{{' + key + '}}' || value === '' ? '' : value; } }, run: () => { GTAG_APP.setParams(); window.dataLayer = window.dataLayer || []; gtag('js', new Date()); GTAG_APP.setConfig(); gtag('config', GTAG_APP.params.GA4_TRACKING_ID, GTAG_APP.config); if (GTAG_APP.params.GTAG_ADWORDS_ID) { gtag('config', GTAG_APP.params.GTAG_ADWORDS_ID, window.MEMBER_INFO.ID > 0 ? {'allow_enhanced_conversions': true} : {}); } GTAG_APP.setUserData(); GTAG_APP.productDetail() GTAG_APP.pageCategory() GTAG_APP.dynamicLoader(); GTAG_APP.addToCart() GTAG_APP.wishList() GTAG_APP.login() GTAG_APP.register() GTAG_APP.orderApprove() GTAG_APP.pageCart() GTAG_APP.orderAddress() GTAG_APP.orderPayment() GTAG_APP.removeFromCart(); }, categoryTree: (categoryPath) => { categoryPath = categoryPath.split(' > '); if (categoryPath[categoryPath.length - 1] === '') { delete categoryPath[categoryPath.length - 1]; } let categoryTree = []; categoryPath.forEach((category, index) => { categoryTree['item_category' + (index === 0 ? '' : index + 1)] = category; }); return categoryTree; }, setUserData: () => { if (GTAG_APP.params.SEND_MEMBER === 'true' && window.MEMBER_INFO.MAIL !== '') { gtag('set', 'user_data', { 'email': window.MEMBER_INFO.MAIL, 'address': { 'first_name': window.MEMBER_INFO.FIRST_NAME, 'last_name': window.MEMBER_INFO.LAST_NAME, 'city': window.MEMBER_INFO.MEMBER_CITY, 'country': window.MEMBER_INFO.MEMBER_COUNTRY, 'postal_code': window.MEMBER_INFO.MEMBER_ZIP_CODE, } }) } }, setConfig: () => { if (GTAG_APP.params.SEND_MEMBER === "true" && window.MEMBER_INFO.ID > 0) { GTAG_APP.config.user_id = window.MEMBER_INFO.ID; } }, getCartItems: async () => { await TSOFT_APPS.get.cart.load(); const cartLoad = await TSOFT_APPS.get.result.cart.load; if (cartLoad === null) { return { items: [], value: 0, currency: GTAG_APP.currency, } } const products = cartLoad.PRODUCTS.map((product, index) => { let price = parseFloat(parseFloat(product.PRICE_SELL).toFixed(2)); let discount = 0; if (product.IS_DISCOUNT_ACTIVE) { let priceNotDiscounted = parseFloat(parseFloat(product.PRICE_NOT_DISCOUNTED).toFixed(2)); discount = parseFloat(parseFloat(priceNotDiscounted - price).toFixed(2)); } let item_variant = ''; if (typeof product.VARIANT1_NAME !== 'undefined'){ item_variant = product.VARIANT1_NAME; } if (typeof product.VARIANT2_NAME !== 'undefined'){ item_variant += ' ' + product.VARIANT2_NAME; } return { item_id: GTAG_APP.params.PRODUCT_TYPE === 'id' ? product.ID : product.PRODUCT_CODE, item_name: product.TITLE, index: index, item_brand: product.BRAND, item_list_id: product.CATEGORY_ID, item_list_name: product.CATEGORY_NAME, price: price, discount: discount > 0 ? discount : 0, quantity: parseInt(product.COUNT), item_variant: item_variant, ...GTAG_APP.categoryTree(product.CATEGORY_PATH + product.CATEGORY_NAME), } }); return { items: products, value: parseFloat(parseFloat(cartLoad.PRICE_TOTAL_SELL).toFixed(2)), coupon: cartLoad.COUPON_CODE, currency: GTAG_APP.currency } }, productDetail: () => { if (window.PAGE_TYPE === "product") { const productData = PRODUCT_DATA[0]; let salePrice = parseFloat(parseFloat(productData.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (productData.vat / 100))).toFixed(2)); } let discount = 0; if (productData.total_base_price > productData.total_sale_price){ discount = parseFloat((productData.total_base_price - productData.total_sale_price).toFixed(2)); } gtag("event", "view_item", { "currency": GTAG_APP.currency, "value": parseFloat(parseFloat(productData.sale_price).toFixed(2)), "items": [ { "item_id": productData[GTAG_APP.params.PRODUCT_TYPE], "item_name": productData.name, "index": 0, "item_brand": productData.brand, "item_list_id": productData.category_id, "item_list_name": productData.category, "price": salePrice, "discount": discount > 0 ? discount : 0, "quantity": parseInt(productData.quantity) > 0 ? 1 : 0, ...GTAG_APP.categoryTree(productData.category_path + productData.category), } ] }); } }, pageCategory: () => { if (window.PAGE_TYPE === "category") { let category = { name: '', id: '', } if (typeof CATEGORY_DATA !== 'undefined') { category = CATEGORY_DATA; } const products = PRODUCT_DATA; gtag('event', 'view_item_list', { 'item_list_name': category.name, 'item_list_id': category.id, 'items': products.slice(0, 200).map((product, index) => { let salePrice = parseFloat(parseFloat(product.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (product.vat / 100))).toFixed(2)); } let discount = 0; if (product.total_base_price > product.total_sale_price){ discount = parseFloat((product.total_base_price - product.total_sale_price).toFixed(2)); } return { item_id: product[GTAG_APP.params.PRODUCT_TYPE], item_name: product.name, index: index, item_brand: product.brand, item_list_id: product.category_id, item_list_name: (product.category_path + product.category).replace(/ > /g, '/'), price: salePrice, discount: discount > 0 ? discount : 0, ...GTAG_APP.categoryTree(product.category_path + product.category), } }) }); } }, dynamicLoader: () => { TSOFT_APPS.product.dynamicLoader.push(function (products) { gtag('event', 'view_item_list', { 'items': products.slice(0, 200).map((product, index) => { let salePrice = parseFloat(parseFloat(product.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (product.vat / 100))).toFixed(2)); } let discount = 0; if (product.total_base_price > product.total_sale_price){ discount = parseFloat((product.total_base_price - product.total_sale_price).toFixed(2)); } return { id: product[GTAG_APP.params.PRODUCT_TYPE], name: product.name, list_name: product.category, brand: product.brand, category: (product.category_path + product.category).replace(/ > /g, '/'), list_position: index + 1, quantity: parseInt(product.quantity) > 0 ? 1 : 0, price: salePrice, discount: discount > 0 ? discount : 0 } }), }); }); }, addToCart: () => { TSOFT_APPS.cart.callback.add.push(function (r) { if (([-1, 0].includes(r.status))) { return false; } let addedProduct = Array.isArray(r) ? r[0].addedProduct : r.addedProduct; gtag("event", "add_to_cart", { 'currency': GTAG_APP.currency, 'value': parseFloat(parseFloat(addedProduct.price).toFixed(2) * parseInt(addedProduct.quantity)), 'items': [ { 'item_id': addedProduct[GTAG_APP.params.PRODUCT_TYPE], 'item_name': addedProduct.name, 'index': 0, 'item_brand': addedProduct.brand, 'item_list_name': addedProduct.category, 'price': parseFloat(parseFloat(addedProduct.price).toFixed(2)), 'quantity': parseInt(addedProduct.quantity), ...GTAG_APP.categoryTree(addedProduct.category_path + addedProduct.category), } ] }); }) }, wishList: () => { TSOFT_APPS.product.wishList.callback.add.push(function (r) { if (r.status) { let product = r.data[0].product; gtag("event", "add_to_wishlist", { 'currency': GTAG_APP.currency, 'value': parseFloat(parseFloat(product.price).toFixed(2)), 'items': [ { item_id: product[GTAG_APP.params.PRODUCT_TYPE], item_name: product.name, index: 0, item_list_name: product.category_name, quantity: 1, price: parseFloat(parseFloat(product.price).toFixed(2)), ...GTAG_APP.categoryTree((product.category_path + product.category_name) || '') } ], }); } }) }, login: () => { TSOFT_APPS.page.tracking.login.callback.push(function (params) { gtag("event", "login", {}); }) }, register: () => { TSOFT_APPS.page.tracking.sign.callback.push(function (params) { if ([1, 2].includes(params.status)) { gtag("event", "sign_up", {}); } }) }, pageCart: () => { TSOFT_APPS.page.cart.callback.push(async function (data) { const cart = await GTAG_APP.getCartItems(); if (cart.items.length === 0) { return false; } const buyButton = document.getElementById('addCartBtn') || document.getElementById('cart-buy-btn'); if(buyButton){ buyButton.addEventListener('click', function (event) { event.preventDefault(); gtag("event", "begin_checkout", cart); if (typeof checkPriceCart === 'undefined'){ window.location.href = buyButton.getAttribute('href'); } }); } gtag("event", "view_cart", cart); }) }, orderAddress: () => { TsoftAppsOrderAddressCallback(async function () { const cart = await GTAG_APP.getCartItems(); if (cart.items.length === 0) { return false; } gtag("event", "add_shipping_info", cart); gtag('event', 'checkout_progress', { 'items': cart.items, 'checkout_step': 2 }); }); }, orderPayment: () => { TsoftAppsOrderPaymentCallback(async function (params) { const cart = await GTAG_APP.getCartItems(); if (cart.items.length === 0) { return false; } gtag('event', 'checkout_progress', { 'items': cart.items, 'checkout_step': 3 }); gtag("event", "add_payment_info", cart); }) }, removeFromCart: () => { TSOFT_APPS.cart.callback.delete.push(function (params) { let deleteObj = false; if (params?.deletedProduct?.id){ deleteObj = params.deletedProduct; }else if (params?.type === 'decrement' && params?.addedProduct?.id){ deleteObj = params.addedProduct; } if (params.status && deleteObj?.id) { gtag("event", "remove_from_cart", { currency: GTAG_APP.currency, value: parseFloat(parseFloat(deleteObj.price * deleteObj.quantity).toFixed(2)), items: [ { item_id: deleteObj.id, item_name: deleteObj.name, index: 0, item_brand: deleteObj.brand, price: parseFloat(parseFloat(deleteObj.price).toFixed(2)), quantity: parseInt(deleteObj.quantity) } ] }); } }) }, orderApprove: () => { TsoftAppsOrderApproveCallback(function (order) { const currency = order[GTAG_APP.params.GTAG_CURRENCY_TYPE] === 'TL' ? 'TRY' : order[GTAG_APP.params.GTAG_CURRENCY_TYPE]; const products = order.products.map((product, index) => { const price = GTAG_APP.params.GTAG_CURRENCY_TYPE === 'currency' ? product.amount_order : product.amount_store return { item_id: GTAG_APP.params.PRODUCT_TYPE === 'id' ? product.identifier : product.code, item_name: product.name, index: index, item_brand: product.brand, item_list_id: product.category_id, item_list_name: product.category_name, quantity: parseInt(product.quantity), price: parseFloat(parseFloat(price).toFixed(2)), ...GTAG_APP.categoryTree(product.category_path + product.category_name) } }); let orderValue = products.reduce((acc, product) => { return acc + (product.price * product.quantity); }, 0); gtag("event", "purchase", { 'transaction_id': order.transaction, 'value': parseFloat(parseFloat(orderValue).toFixed(2)), 'tax': parseFloat(parseFloat(order.total_vat).toFixed(2)), 'shipping': parseFloat(parseFloat(order.cargo_price).toFixed(2)), 'currency': currency, 'coupon': order.coupon, 'items': products }); //For Track Ads conversions if (GTAG_APP.params.GTAG_ADWORDS_ID !== '') { gtag('event', 'conversion', { 'send_to': GTAG_APP.params.GTAG_ADWORDS_ID + '/' + GTAG_APP.params.GTAG_ADWORDS_LABEL, 'value': parseFloat(orderValue.toFixed(2)), 'currency': currency, 'transaction_id': order.transaction }); } }); } } GTAG_APP.run();
T-Soft E-Ticaret Sistemleriyle Hazırlanmıştır.