1"use strict";(self.webpackChunkcubic_9_com=self.webpackChunkcubic_9_com||[]).push([[2295],{13691:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/WS2812S_2-8fd082027e16f2c79070205121bd73f8.jpg"},28453:(e,s,n)=>{n.d(s,{R:()=>c,x:()=>l});var r=n(96540);const t={},i=r.createContext(t);function c(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),r.createElement(i.Provider,{value:s},e.children)}},52391:(e,s,n)=>{n.d(s,{A:()=>d});var r=n(96540),t=n(5556),i=n.n(t),c=n(74848);function l({url:e}){const s=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(!e||!s.current)return;const r=e.replace("x.com","twitter.com");n.e(4204).then(n.t.bind(n,4204,23)).then((({default:e})=>{const n=`\n <blockquote class="twitter-tweet">\n <a href="${r}"></a>\n </blockquote>\n <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n `;e(s.current,n)})).catch((e=>{console.error("Failed to load postscribe:",e)}))}),[e]),(0,c.jsx)("div",{ref:s})}l.propTypes={url:i().string.isRequired};const d=l},59201:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>a,contentTitle:()=>d,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi/\u30de\u30a4\u30b3\u30f3\u5185\u8535LED","title":"\u30de\u30a4\u30b3\u30f3\u5185\u8535LED","description":"Raspberry Pi\u3067\u30de\u30a4\u30b3\u30f3\u5185\u8535LED\u3092\u5149\u3089\u305b\u3066\u307f\u307e\u3059\u3002","source":"@site/docs/Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi/\u30de\u30a4\u30b3\u30f3\u5185\u8535LED.md","sourceDirName":"Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi","slug":"/Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi/\u30de\u30a4\u30b3\u30f3\u5185\u8535LED","permalink":"/Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi/\u30de\u30a4\u30b3\u30f3\u5185\u8535LED","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"RaspberryPi","permalink":"/Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi/"},"next":{"title":"\u65e5\u672c\u8a9e\u97f3\u58f0\u8a8d\u8b58","permalink":"/Devel/\u96fb\u5b50\u5de5\u4f5c/RaspberryPi/\u65e5\u672c\u8a9e\u97f3\u58f0\u8a8d\u8b58"}}');var t=n(74848),i=n(28453),c=n(52391);const l={},d=void 0,a={},h=[{value:"\u5fc5\u8981\u306a\u3082\u306e",id:"\u5fc5\u8981\u306a\u3082\u306e",level:2},{value:"\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2",id:"\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2",level:3},{value:"\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2",id:"\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2",level:3},{value:"\u624b\u9806",id:"\u624b\u9806",level:2},{value:"GPIO18\uff0812\u756a\u30d4\u30f3\uff09\u3092\u4f7f\u3046\u5834\u5408",id:"gpio1812\u756a\u30d4\u30f3\u3092\u4f7f\u3046\u5834\u5408",level:2}];function o(e){const s={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"Raspberry Pi\u3067\u30de\u30a4\u30b3\u30f3\u5185\u8535LED\u3092\u5149\u3089\u305b\u3066\u307f\u307e\u3059\u3002"}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"/Devel/%E9%9B%BB%E5%AD%90%E5%B7%A5%E4%BD%9C/irMagician/%E8%B5%A4%E5%A4%96%E7%B7%9A%E5%AD%A6%E7%BF%92%E3%83%AA%E3%83%A2%E3%82%B3%E3%83%B3R2-D2",children:"\u8d64\u5916\u7dda\u5b66\u7fd2\u30ea\u30e2\u30b3\u30f3R2-D2"}),"\u306b\u96fb\u98fe\u3092\u4ed5\u8fbc\u3080\u305f\u3081\u306e\u8981\u7d20\u6280\u8853\u78ba\u8a8d\u3067\u3059\u3002"]}),"\n","\n",(0,t.jsx)(c.A,{url:"https://twitter.com/cubic9com/status/952092006217469952"}),"\n",(0,t.jsx)(s.h2,{id:"\u5fc5\u8981\u306a\u3082\u306e",children:"\u5fc5\u8981\u306a\u3082\u306e"}),"\n",(0,t.jsx)(s.h3,{id:"\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2",children:"\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2"}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{children:"\u9805\u76ee"}),(0,t.jsx)(s.th,{children:"\u8aac\u660e"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"http://www.amazon.co.jp/exec/obidos/ASIN/B01CFHHYF4/cubic9com-22",children:"Raspberry Pi"})}),(0,t.jsx)(s.td,{children:"ARM\u30d7\u30ed\u30bb\u30c3\u30b5\u3092\u642d\u8f09\u3057\u305f\u540d\u523a\u30b5\u30a4\u30ba\u306e\u8d85\u5c0f\u578b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3002GPIO\u30dd\u30fc\u30c8\uff08\u6c4e\u7528\u5165\u51fa\u529b\u30dd\u30fc\u30c8\uff09\u3092\u5099\u3048\u3066\u304a\u308a\u3001\u5404\u7a2e\u5916\u90e8\u6a5f\u5668\u3092\u64cd\u4f5c\u3067\u304d\u308b\u3002"})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"http://www.amazon.co.jp/exec/obidos/ASIN/B00MQPRIB6/cubic9com-22",children:"\u30d5\u30eb\u30ab\u30e9\u30fc\u30b7\u30ea\u30a2\u30ebLED\u30c6\u30fc\u30d7"})}),(0,t.jsxs)(s.td,{children:["WS2812S(NeoPixel)\u3068\u3044\u3046\u30de\u30a4\u30b3\u30f3\u5185\u8535LED\u3092\u30c6\u30fc\u30d7\u4e0a\u306b\u3057\u305f\u3082\u306e\u3067\u3059\u3002\u3064\u306a\u304c\u3063\u305f\u307e\u307e\u3067\u3082\u30011\u500b\u305a\u3064\u5207\u308a\u96e2\u3057\u3066\u3082\u4f7f\u3048\u3066\u4fbf\u5229\u3067\u3059\u3002&br;",(0,t.jsx)(s.a,{href:"http://akizukidenshi.com/",children:"\u79cb\u6708\u96fb\u5b50\u901a\u5546"}),"\u306a\u3069\u3067\u3082\u540c\u69d8\u306e\u3082\u306e\u3092\u8ca9\u58f2\u3057\u3066\u3044\u307e\u3059\u3002"]})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://www.switch-science.com/catalog/1466/",children:"TXB0104\u642d\u8f09\u96fb\u5727\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf"})}),(0,t.jsx)(s.td,{children:"\u4fe1\u53f7\u306e\u96fb\u5727\u30ec\u30d9\u30eb\u3092\u5909\u63db\u3059\u308b\u3082\u306e\u3002Raspberry Pi\u306eGPIO\u306f3.3V\u3001WS2812S\u306e\u52d5\u4f5c\u96fb\u5727\u306f5V\u306e\u305f\u3081\u3001\u4f7f\u7528\u3057\u307e\u3059\u3002&br;\u76ee\u7684\u304c\u679c\u305f\u305b\u308c\u3070\u4ed6\u306e\u88fd\u54c1\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u3002"})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"http://akizukidenshi.com/catalog/g/gK-06656/",children:"\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\u7528\u30de\u30a4\u30af\u30edB\u30e1\u30b9USB\u30b3\u30cd\u30af\u30bfDIP\u5316\u30ad\u30c3\u30c8"})}),(0,t.jsx)(s.td,{children:"WS2812S\u3092\u5149\u3089\u305b\u308b\u305f\u3081\u306e5V\u96fb\u6e90\u3092\u624b\u8efd\u306b\u5f97\u308b\u305f\u3081\u306b\u4eca\u56de\u306fUSB\u30cf\u30d6\u304b\u3089\u96fb\u6e90\u3092\u53d6\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002"})]})]})]}),"\n",(0,t.jsx)(s.h3,{id:"\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2",children:"\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2"}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{children:"\u9805\u76ee"}),(0,t.jsx)(s.th,{children:"\u8aac\u660e"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:(0,t.jsx)(s.a,{href:"https://github.com/jgarff/rpi_ws281x",children:"rpi_ws281x"})}),(0,t.jsx)(s.td,{children:"Raspberry Pi\u306eGPIO\u3067WS2812S\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3002"})]})})]}),"\n",(0,t.jsx)(s.h2,{id:"\u624b\u9806",children:"\u624b\u9806"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsx)(s.li,{children:"Raspberry Pi\u306e3.3V(1\u756a\u30d4\u30f3)\u3068\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u306eVcca\u3092\u63a5\u7d9a\u3059\u308b\u3002"}),"\n",(0,t.jsx)(s.li,{children:"Raspberry Pi\u306eGND(6\u756a\u30d4\u30f3)\u3068\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u306eGND\u3092\u63a5\u7d9a\u3059\u308b\u3002"}),"\n",(0,t.jsx)(s.li,{children:"Raspberry Pi\u306eGPIO18(12\u756a\u30d4\u30f3)\u3068\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u306eA1\u3092\u63a5\u7d9a\u3059\u308b\u3002~\r\n\uff08GPIO18\uff0812\u756a\u30d4\u30f3\uff09\u3092\u4f7f\u3046\u5834\u5408\u306f\u6ce8\u610f\u304c\u5fc5\u8981\uff08\u5f8c\u8ff0\uff09\uff09"}),"\n",(0,t.jsx)(s.li,{children:"\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u3068\u30b7\u30ea\u30a2\u30ebLED\u30c6\u30fc\u30d7\u3092\u63a5\u7d9a\u3059\u308b\u3002"}),"\n",(0,t.jsx)(s.li,{children:"\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u306eVccb\u3068USB\u30b3\u30cd\u30af\u30bf\u306eVbus\u3068\u30b7\u30ea\u30a2\u30ebLED\u30c6\u30fc\u30d7\u306e1. 5V\u3092\u63a5\u7d9a\u3059\u308b\u3002"}),"\n",(0,t.jsx)(s.li,{children:"\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u306eGND\u3068USB\u30b3\u30cd\u30af\u30bf\u306eGND\u3068\u30b7\u30ea\u30a2\u30ebLED\u30c6\u30fc\u30d7\u306eGND\u3092\u63a5\u7d9a\u3059\u308b\u3002"}),"\n",(0,t.jsx)(s.li,{children:"\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u306eB1\u3068\u30b7\u30ea\u30a2\u30ebLED\u30c6\u30fc\u30d7\u306eDI\u3092\u63a5\u7d9a\u3059\u308b\u3002"}),"\n",(0,t.jsxs)(s.li,{children:["\u5fc5\u8981\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002","\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"sudo aptitude install scons\r\nsudo aptitude install swig\r\nsudo aptitude install python-dev\n"})}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u767a\u5149\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3059\u3002\u30d1\u30bf\u30fc\u30f3\u304c\u5149\u308c\u3070OK\u3002","\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"cd rpi_ws281x-master/\r\nsudo scons\r\nsudo ./test\n"})}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["Python\u3067\u81ea\u7531\u306b\u767a\u5149\u30d1\u30bf\u30fc\u30f3\u3092\u4f5c\u308b\u305f\u3081\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u307e\u3059\u3002","\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"cd python\r\nsudo python setup.py install\n"})}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["\u5f8c\u306frpi_ws281x-master/python/examples\u914d\u4e0b\u306estrandtest.py\u3092\u6539\u902
10\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5b9f\u884c\u3059\u308c\u3070OK\u3002","\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"sudo python ~/rpi_ws281x-master/python/examples/a.py\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)("div",{class:"markdown",children:[(0,t.jsx)("img",{src:n(70892).A,style:{width:"25%"}}),(0,t.jsx)("img",{src:n(13691).A,style:{width:"25%"}})]}),"\n",(0,t.jsx)(s.h2,{id:"gpio1812\u756a\u30d4\u30f3\u3092\u4f7f\u3046\u5834\u5408",children:"GPIO18\uff0812\u756a\u30d4\u30f3\uff09\u3092\u4f7f\u3046\u5834\u5408"}),"\n",(0,t.jsx)(s.p,{children:"GPIO18\uff0812\u756a\u30d4\u30f3\uff09\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001config.txt\u3092\u958b\u304d\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\u3092\u30aa\u30d5\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"sudo vi /boot/config.txt\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"# Enable audio (loads snd_bcm2835)\r\n#dtparam=audio=on\n"})}),"\n",(0,t.jsx)(s.p,{children:"GPIO12\uff0832\u756a\u30d4\u30f3\uff09\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001\u4e0a\u8a18\u306e\u8a2d\u5b9a\u306f\u4e0d\u8981\u3067\u3059\u3002"})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},70892:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/WS2812S_1-750265b1be7ceb41daba66873a3f8147.jpg"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.