参考サイト 2023年12月11日 最終更新日時 : 2023年12月11日 fittingmind All Docs raspberry pi’s Docs ▸ 参考サイト Read History <link rel="canonical" href="https://zenn.dev/kotaproj/books/raspberrypi-tips/viewer/030_kiso_buzzer" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta property="og:url" content="https://zenn.dev/kotaproj/books/raspberrypi-tips/viewer/030_kiso_buzzer" data-next-head=""/><meta property="og:title" content="🔈圧電ブザーを鳴らす – ⭐|ラズベリーパイのレシピ" data-next-head=""/><meta property="og:image" content="https://res.cloudinary.com/zenn/image/upload/s–ufxab6mc–/g_center%2Ch_280%2Cl_fetch:aHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL3plbm4tdXNlci11cGxvYWQvYm9va19jb3Zlci84NDViMWIxOTQ4LmpwZw==%2Cw_200/v1627283836/default/og-base-book_yz4z02.jpg" data-next-head=""/><meta property="og:type" content="article" data-next-head=""/><meta property="og:site_name" content="Zenn" data-next-head=""/><meta content="kotaprojさんによる本" name="zenn:description" data-next-head=""/><meta content="Zenn" name="apple-mobile-web-app-title"/><link href="/manifest.json" rel="manifest"/><link href="https://static.zenn.studio/images/logo-transparent.png" rel="shortcut icon" type="image/png"/><link href="https://static.zenn.studio/images/icon.png" rel="apple-touch-icon-precomposed" type="image/png"/><link nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" rel="preload" href="https://static.zenn.studio/_next/static/css/4dc02ef4ec2dacbd.css" as="style"/><link nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" rel="preload" href="https://static.zenn.studio/_next/static/css/ec7283a9751dbded.css" as="style"/><script nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=">function getSystemTheme() { if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { return 'dark-blue'; } return 'light'; } function applyTheme(theme) { let actualTheme; if (theme === 'system') { actualTheme = getSystemTheme(); } else { actualTheme = theme; } window.document.documentElement.dataset.theme = actualTheme; } const storedTheme = localStorage.getItem('theme'); const theme = storedTheme || 'system'; applyTheme(theme); // システムテーマの変更を監視 if (window.matchMedia) { window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function() { const currentTheme = localStorage.getItem('theme') || 'system'; if (currentTheme === 'system') { applyTheme('system'); } }); }</script><script nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=">var newDataLayer = {}; // display_modeを追加 if (window.matchMedia('(display-mode: standalone)').matches) { newDataLayer.display_mode = 'standalone'; // PWA } else if (window.navigator.standalone === true) { newDataLayer.display_mode = 'standalone'; // PWA on iOS Safari } else { newDataLayer.display_mode = 'browser'; // Web } // user_idを追加 // ページ初期化時に取得したいため、ローカルストレージからcachedUser.idを取得する var zennCurrentUserValue = localStorage.getItem('zenn_current_user'); if (zennCurrentUserValue) { try { var currentUser = JSON.parse(zennCurrentUserValue); if (currentUser.cachedUser) { newDataLayer.user_id = currentUser.cachedUser.id; } } catch {} } window.dataLayer = window.dataLayer || []; window.dataLayer.push(newDataLayer);</script><script nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-K42DRM8');</script><script nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=">window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date());</script><script src="https://embed.zenn.studio/js/listen-embed-event.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A="></script><style nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A="> @font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: local(''), url('https://static.zenn.studio/fonts/inter-v3-latin-600.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: local(''), url('https://static.zenn.studio/fonts/inter-v3-latin-700.woff2') format('woff2'); }</style><link nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" rel="stylesheet" href="https://static.zenn.studio/_next/static/css/4dc02ef4ec2dacbd.css" data-n-g=""/><link nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" rel="stylesheet" href="https://static.zenn.studio/_next/static/css/ec7283a9751dbded.css" data-n-p=""/><noscript data-n-css="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A="></noscript><script defer="" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" noModule="" src="https://static.zenn.studio/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="https://static.zenn.studio/_next/static/chunks/webpack-273290135e1e06dc.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/framework-4b965f9fd7a6ee19.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/main-1c3c5ca0e48aa80a.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/pages/_app-e66917229c7721cb.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/116-80dc18062b64e930.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/5234-54e4bbdf2ffb19a8.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/3807-80cdca2cee8a4c71.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/chunks/pages/%5Busername%5D/books/%5Bslug%5D/viewer/%5B%5B…chapter_slug%5D%5D-11d9e035f4a2e1cf.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/3EIn8hFWtL8m4xpZF0sIM/_buildManifest.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script><script src="https://static.zenn.studio/_next/static/3EIn8hFWtL8m4xpZF0sIM/_ssgManifest.js" nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=" defer=""></script></head><body><script nonce="GazV6XFl7LZK1zSP0IJaucCB+78kViJeDvwRcttKD3A=">const shouldUseTwemoji = !/(googlebot|macintosh|macintel|macppc|mac68k|macos|iphone|ipad)/i.test(window.navigator.userAgent); if(shouldUseTwemoji) document.body.setAttribute("data-use-twemoji", "true");</script><link rel="preload" as="image" href="https://res.cloudinary.com/zenn/image/fetch/s–f0jOnZub–/c_fill%2Cf_jpg%2Cfl_progressive%2Ch_350%2Cq_80%2Cw_250/https://storage.googleapis.com/zenn-user-upload/book_cover/845b1b1948.jpg"/><div id="__next"><aside class="View_mobileMenu__3cIsf"><button aria-label="メニューを開く" class="View_menuButton__d2Zlq"><svg x="0px" y="0px" viewBox="0 0 27 27" style="enable-background:new 0 0 27 27" xml:space="preserve" height="26" width="26"><path fill="currentColor" d="M22.8,5.5c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6S23.7,5.5,22.8,5.5z M3.7,6.1c-0.6,0-1.1,0.5-1.1,1 s0.5,1.1,1,1.1c0,0,0,0,0,0h13.8c0.6,0,1.1-0.5,1.1-1s-0.5-1.1-1-1.1c0,0,0,0,0,0H3.7z M22.8,11.9c-0.9,0-1.6,0.7-1.6,1.6 s0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6S23.7,11.9,22.8,11.9z M3.7,12.4c-0.6,0-1.1,0.5-1.1,1s0.5,1.1,1,1.1c0,0,0,0,0,0h13.8 c0.6,0,1.1-0.5,1.1-1s-0.5-1.1-1-1.1c0,0,0,0,0,0H3.7z M22.8,18.3c-0.9,0-1.6,0.7-1.6,1.6c0,0.9,0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6 C24.4,19,23.7,18.3,22.8,18.3z M3.7,18.8c-0.6,0-1.1,0.5-1.1,1s0.5,1.1,1,1.1c0,0,0,0,0,0h13.8c0.6,0,1.1-0.5,1.1-1 c0-0.6-0.5-1.1-1-1.1c0,0,0,0,0,0H3.7z"></path></svg></button><div class="View_mobileMenuTitleContainer__hc79u"><a class="View_mobileBookTitle__oH0dw" href="/kotaproj/books/raspberrypi-tips">ラズベリーパイのレシピ</a></div></aside><article><div class="View_sidebarContainer__yCwRh"><aside class="View_sidebar___jR4h"><a class="ZennLogo_logoLink__NJS2l View_sidebarLogo__WPD1F" href="/"><svg x="0px" y="0px" viewBox="0 0 377.4 88.3" aria-label="Zenn | エンジニアのための情報共有コミュニティ" class="ZennLogo_logoSvg__yOhcg" height="21"><title>Zenn Zenn
raspberry pi ブザーの参考サイト