﻿{"id":850,"date":"2024-01-09T20:07:29","date_gmt":"2024-01-09T12:07:29","guid":{"rendered":"https:\/\/dt9025a.top\/?p=850"},"modified":"2024-01-09T20:07:29","modified_gmt":"2024-01-09T12:07:29","slug":"%e6%96%b0%e7%89%88%e6%9c%ac%e6%a0%91%e8%8e%93%e6%b4%be-raspbian-%e7%b3%bb%e7%bb%9f%e4%b8%ad-wiringpi-%e7%9a%84%e9%80%82%e9%85%8d","status":"publish","type":"post","link":"https:\/\/dt9025a.top\/?p=850","title":{"rendered":"\u65b0\u7248\u672c\u6811\u8393\u6d3e Raspbian \u7cfb\u7edf\u4e2d WiringPi \u7684\u9002\u914d"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"wp-block-verse\">\u6ce8\uff1aWiringPi \u5df2\u505c\u6b62\u7ef4\u62a4<\/pre>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u73b0\u8c61<\/h2>\n\n\n\n<p>\u4ece GitHub \u62c9\u53d6\u6700\u65b0\u7248\u672c\u7684 WiringPi \uff082.70\uff09\uff0c\u5728\u7f16\u8bd1\u5b89\u88c5\u540e\uff0c\u4f7f\u7528 <code>gpio -v<\/code> \u68c0\u9a8c\u65f6\u4f1a\u51fa\u73b0\u5982\u4e0b\u63d0\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gpio version: 2.70\r\nCopyright (c) 2012-2018 Gordon Henderson\r\nThis is free software with ABSOLUTELY NO WARRANTY.\r\nFor details type: gpio -warranty\r\n\r\nOops: Unable to determine board revision from \/proc\/cpuinfo\r\n -> No \"Hardware\" line\r\n ->  You'd best google the error to find out why.<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"136\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-6.png\" alt=\"\" class=\"wp-image-863\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-6.png 463w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-6-300x88.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u95ee\u9898\u5b9a\u4f4d<\/h2>\n\n\n\n<p>\u9996\u5148\u5b9a\u4f4d\u8be5\u63d0\u793a\u8f93\u51fa\u7684\u4f4d\u7f6e\uff0c\u5728 <code>wiringPi\/wiringPi.c<\/code> \u4e2d\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"292\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-4.png\" alt=\"\" class=\"wp-image-859\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-4.png 734w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-4-300x119.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/figure>\n<\/div>\n\n\n<p>\u67e5\u627e\u8be5\u51fd\u6570\u7684\u8c03\u7528\uff0c\u6709\u4e00\u4e2a\u8c03\u7528\u8f93\u51fa\u4e86  \u201c<code>No \"Hardware\" line<\/code>\u201d\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"395\" height=\"557\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-5.png\" alt=\"\" class=\"wp-image-860\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-5.png 395w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-5-213x300.png 213w\" sizes=\"auto, (max-width: 395px) 100vw, 395px\" \/><\/figure>\n<\/div>\n\n\n<p>\u67e5\u770b\u8fd9\u4e2a\u8c03\u7528\uff0c\u53d1\u73b0\u662f\u67e5\u627e <code>\/proc\/cpuinfo<\/code> \u4e2d\u7684 <code>Hardware<\/code> \u884c\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"66\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-7.png\" alt=\"\" class=\"wp-image-865\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-7.png 468w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-7-300x42.png 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"409\" height=\"604\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-8.png\" alt=\"\" class=\"wp-image-867\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-8.png 409w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-8-203x300.png 203w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/figure>\n<\/div>\n\n\n<p>\u53d1\u73b0\u5728 <code>\/proc\/cpuinfo<\/code> \u4e2d\u786e\u5b9e\u4e0d\u5b58\u5728 <code>Hardware<\/code> \u884c\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u522b\u5904\u624b\u52a8\u5236\u4f5c\u4e00\u4e2a <code>cpuinfo<\/code> \u6587\u4ef6\uff0c\u5305\u542b WiringPi \u6240\u9700\u8981\u7684\u6240\u6709\u4fe1\u606f\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"440\" height=\"94\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-9.png\" alt=\"\" class=\"wp-image-868\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-9.png 440w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-9-300x64.png 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/figure>\n<\/div>\n\n\n<p>\u5e76\u4fee\u6539 WiringPi \u4e2d\u6240\u6709\u5bf9 <code>\/proc\/cpuinfo<\/code> \u6587\u4ef6\u7684\u8c03\u7528\u4e3a\u8c03\u7528\u4fee\u6539\u8fc7\u7684 <code>cpuinfo<\/code> \u6587\u4ef6\uff0c\u5206\u522b\u5728 <code>piGpioLayout<\/code> \u51fd\u6570\u4e0e <code>piBoardId<\/code> \u51fd\u6570\u4e2d\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"453\" height=\"195\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-10.png\" alt=\"\" class=\"wp-image-869\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-10.png 453w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-10-300x129.png 300w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"699\" height=\"305\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-11.png\" alt=\"\" class=\"wp-image-870\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-11.png 699w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-11-300x131.png 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/figure>\n<\/div>\n\n\n<p>\u91cd\u65b0\u7f16\u8bd1\u5b89\u88c5\u540e\uff0c\u518d\u6b21\u6267\u884c <code>gpio -v<\/code> \u547d\u4ee4\uff0c\u53ef\u4ee5\u6b63\u5e38\u8bc6\u522b\u677f\u5b50\u4fe1\u606f\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"431\" height=\"188\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-12.png\" alt=\"\" class=\"wp-image-871\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-12.png 431w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-12-300x131.png 300w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/figure>\n<\/div>\n\n\n<p>\u6267\u884c <code>gpio readall<\/code> \u547d\u4ee4\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"417\" src=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-13.png\" alt=\"\" class=\"wp-image-872\" srcset=\"https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-13.png 621w, https:\/\/dt9025a.top\/wp-content\/uploads\/2024\/01\/image-13-300x201.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u78c1\u94c1\u5b8c\u7ed3\u55b5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\uff1aWiringPi \u5df2\u505c\u6b62\u7ef4\u62a4 \u73b0\u8c61 \u4ece GitHub \u62c9\u53d6\u6700\u65b0\u7248\u672c\u7684 WiringPi \uff082.70\uff09\uff0c\u5728\u7f16&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/dt9025a.top\/?p=850\">\u9605\u8bfb\u66f4\u591a<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":["post-850","post","type-post","status-publish","format-standard","hentry","category-linux-and-so-on","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dt9025a.top\/index.php?rest_route=\/wp\/v2\/posts\/850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dt9025a.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dt9025a.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dt9025a.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dt9025a.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=850"}],"version-history":[{"count":0,"href":"https:\/\/dt9025a.top\/index.php?rest_route=\/wp\/v2\/posts\/850\/revisions"}],"wp:attachment":[{"href":"https:\/\/dt9025a.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dt9025a.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dt9025a.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}