{"id":1058,"date":"2017-08-20T15:33:00","date_gmt":"2017-08-20T15:33:00","guid":{"rendered":"https:\/\/rawbytes.org\/?p=1058"},"modified":"2025-11-24T02:59:35","modified_gmt":"2025-11-24T02:59:35","slug":"raspi-3-%e3%81%a7wiringpi%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%8c%e3%81%a7%e3%81%9f%e3%81%ae%e3%81%a7pigpio%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f","status":"publish","type":"post","link":"https:\/\/rawbytes.org\/?p=1058","title":{"rendered":"RasPi 3 \u3067WiringPi\u3067\u30a8\u30e9\u30fc\u304c\u3067\u305f\u306e\u3067pigpio\u3092\u4f7f\u3063\u305f"},"content":{"rendered":"<p>Raspberry pi 3\u3067\u30b5\u30fc\u30dc\u306e\u5236\u5fa1\u3092\u3084\u3063\u3066\u307f\u3088\u3046\u3068\u601d\u3063\u3066SG90\u3068\u3044\u3046\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u3002\u96fb\u5b50\u5de5\u4f5c\u306e\u5206\u91ce\u3067\u306f\u6700\u3082\u624b\u8efd\u306a\u30e2\u30fc\u30bf\u30fc\u3067\u30cd\u30c3\u30c8\u3067\u8abf\u3079\u3066\u3082\u60c5\u5831\u304c\u591a\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3002\u3053\u308c\u3092\u3046\u307e\u304f\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u5c11\u3057\u30cf\u30de\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u8a18\u9332\u3067\u3059\u3002\u7d50\u8ad6\u3068\u3057\u3066\u306fwiringPi\u306f\u4f7f\u308f\u305a\u3001pigpio\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u74b0\u5883\u306f\u4ee5\u4e0b\u3002 <\/p>\n<pre class=\"prettyprint\">pi@raspberrypi ~\/src\/wiringpi % cat \/etc\/issue\nRaspbian GNU\/Linux 8 n l\n\npi@raspberrypi ~\/src\/wiringpi % uname -a\nLinux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU\/Linux\n\n<\/pre>\n<p>RPi.GPIO\u3067\u306ePWM\u51fa\u529b\u30b5\u30f3\u30d7\u30eb\u3092\u8a66\u3059\u3068\u30b5\u30fc\u30dc\u306f\u52d5\u4f5c\u3059\u308b\u306e\u3067\u3059\u304c\u300c\u30d6\u30eb\u30d6\u30eb\u300d\u3068\u632f\u52d5\u3057\u3066\u3057\u307e\u3063\u3066\u3046\u307e\u304f\u9759\u6b62\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002\u52d5\u4f5c\u306e\u30c1\u30a7\u30c3\u30af\u306b\u306f\u5341\u5206\u3067\u3059\u304c\u3001\u306a\u306b\u304b\u610f\u5473\u306e\u3042\u308b\u3082\u306e\u304c\u4f5c\u308c\u308b\u54c1\u8cea\u3067\u306f\u306a\u3055\u305d\u3046\u3002<\/p>\n<p>\u8abf\u3079\u308b\u3068\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc\u306e\u5236\u5fa1\u306b\u306fPWM\u51fa\u529b\u3092\u4f7f\u3046\u306e\u3067\u3059\u304c\u3001\u7cbe\u5ea6\u306e\u826f\u3044\u51fa\u529b\u3092\u5f97\u308b\u305f\u3081\u306b\u306fwiringPi\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u306e\u304c\u5b9a\u756a\u306e\u3088\u3046\u3067\u3057\u305f\u3002 <\/p>\n<p>\u3067\u3059\u304c\u3001\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306e<\/p>\n<pre class=\"prettyprint\">import wiringpi\nPIN = 18 pi.wiringPiSetupGpio()\npi.pinMode(PIN, pi.OUTPUT)\n<\/pre>\n<p>\n\u3053\u308c\u306epinMode\u3092\u30b3\u30fc\u30eb\u3057\u305f\u6642\u70b9\u3067\u3001\u306a\u305c\u304bSD\u30ab\u30fc\u30c9\u304c\u30a4\u30b8\u30a7\u30af\u30c8\u3055\u308c\u305f\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u73fe\u308c\u3001OS\u3082\u4e8b\u5b9f\u4e0a\u30d5\u30ea\u30fc\u30ba\uff08\uff1f\uff09\u96fb\u6e90\u306eOFF\/ON\u3092\u5f37\u3044\u3089\u308c\u308b\u3068\u3044\u3046\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u6319\u52d5\u306b\u906d\u9047\u3057\u307e\u3057\u305f\uff08\u5b9f\u969b\u306b\u306f\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30b7\u30a7\u30eb\u4e0a\uff09<\/p>\n<p>wiringPi\u3092pip\u304b\u3089\u3067\u306a\u304f\u30bd\u30fc\u30b9\u304b\u3089\u30d3\u30eb\u30c9\u3057\u305f\u308a\u3057\u3066\u3082\u6319\u52d5\u306f\u5909\u308f\u3089\u305a\u3001\u30cd\u30c3\u30c8\u3092\u691c\u7d22\u3057\u3066\u307f\u3066\u3082\u305d\u308c\u3089\u3057\u3044\u60c5\u5831\u304c\u306a\u304b\u306a\u304b\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u65b0\u3057\u3059\u304e\u3066wiringPi\u304c\u5bfe\u5fdc\u3057\u3066\u306a\u3044\u3063\u307d\u3044\u3068\u3044\u3046\u8a18\u4e8b\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002<\/p>\n<p>WiringPi\u3067\u300cUnable to determine hardware version. I see: Hardware : BCM2835\u300d\u30a8\u30e9\u30fc <br \/>\n<a href=\"http:\/\/qiita.com\/jollyjoester\/items\/ba59e5d43e28b701f120\" target=\"_blank\">http:\/\/qiita.com\/jollyjoester\/items\/ba59e5d43e28b701f120 <\/a><\/p>\n<p>\n\u30ab\u30fc\u30cd\u30eb\u3092\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u306e\u3082\u5acc\u306a\u306e\u3067\u4ee3\u66ff\u306e\u3082\u306e\u304c\u306a\u3044\u306e\u304b\u8abf\u3079\u3066\u307f\u305f\u3068\u3053\u308d\u3001<\/p>\n<p>pigpio\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3082\u3068\u3082\u3068Raspbian\u306b\u306f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u306e\u3068\u304a\u308a\u306b\u3084\u3063\u305f\u3089\u52d5\u4f5c\u3057\u3001RPi.GPIO\u3092\u5229\u7528\u3057\u305f\u3068\u304d\u306e\u300c\u30d6\u30eb\u30d6\u30eb\u300d\u3068\u3044\u3046\u632f\u52d5\u3082\u767a\u751f\u3057\u306a\u3044\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n<p>\npigpio\u3067\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc\u3092\u52d5\u304b\u3059\u3002 <br \/>\n<a href=\"http:\/\/blue-black.ink\/?p=2946\" target=\"_blank\">http:\/\/blue-black.ink\/?p=294 <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Raspberry pi 3\u3067\u30b5\u30fc\u30dc\u306e\u5236\u5fa1\u3092\u3084\u3063\u3066\u307f\u3088\u3046\u3068\u601d\u3063\u3066SG90\u3068\u3044\u3046\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u3002\u96fb\u5b50\u5de5\u4f5c\u306e\u5206\u91ce\u3067\u306f\u6700\u3082\u624b\u8efd\u306a\u30e2\u30fc\u30bf\u30fc\u3067\u30cd\u30c3\u30c8\u3067\u8abf\u3079\u3066\u3082\u60c5\u5831\u304c\u591a\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3002\u3053\u308c\u3092\u3046\u307e\u304f\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u5c11\u3057\u30cf\u30de\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u8a18\u9332\u3067\u3059\u3002\u7d50\u8ad6\u3068\u3057\u3066\u306fwiringPi\u306f\u4f7f\u308f\u305a\u3001pigpio\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002 \u74b0\u5883\u306f\u4ee5\u4e0b\u3002 pi@raspberrypi ~\/src\/wiringpi % cat \/etc\/issue Raspbian GNU\/Linux 8 n l pi@raspberrypi ~\/src\/wiringpi % uname -a Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU\/Linux RPi.GPIO\u3067\u306ePWM\u51fa\u529b\u30b5\u30f3\u30d7\u30eb\u3092\u8a66\u3059\u3068\u30b5\u30fc\u30dc\u306f\u52d5\u4f5c\u3059\u308b\u306e\u3067\u3059\u304c\u300c\u30d6\u30eb\u30d6\u30eb\u300d\u3068\u632f\u52d5\u3057\u3066\u3057\u307e\u3063\u3066\u3046\u307e\u304f\u9759\u6b62\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002\u52d5\u4f5c\u306e\u30c1\u30a7\u30c3\u30af\u306b\u306f\u5341\u5206\u3067\u3059\u304c\u3001\u306a\u306b\u304b\u610f\u5473\u306e\u3042\u308b\u3082\u306e\u304c\u4f5c\u308c\u308b\u54c1\u8cea\u3067\u306f\u306a\u3055\u305d\u3046\u3002 \u8abf\u3079\u308b\u3068\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc\u306e\u5236\u5fa1\u306b\u306fPWM\u51fa\u529b\u3092\u4f7f\u3046\u306e\u3067\u3059\u304c\u3001\u7cbe\u5ea6\u306e\u826f\u3044\u51fa\u529b\u3092\u5f97\u308b\u305f\u3081\u306b\u306fwiringPi\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u306e\u304c\u5b9a\u756a\u306e\u3088\u3046\u3067\u3057\u305f\u3002 \u3067\u3059\u304c\u3001\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306e import wiringpi PIN = 18 pi.wiringPiSetupGpio() pi.pinMode(PIN, pi.OUTPUT) \u3053\u308c\u306epinMode\u3092\u30b3\u30fc\u30eb\u3057\u305f\u6642\u70b9\u3067\u3001\u306a\u305c\u304bSD\u30ab\u30fc\u30c9\u304c\u30a4\u30b8\u30a7\u30af\u30c8\u3055\u308c\u305f\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u73fe\u308c\u3001OS\u3082\u4e8b\u5b9f\u4e0a\u30d5\u30ea\u30fc\u30ba\uff08\uff1f\uff09\u96fb\u6e90\u306eOFF\/ON\u3092\u5f37\u3044\u3089\u308c\u308b\u3068\u3044\u3046\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u6319\u52d5\u306b\u906d\u9047\u3057\u307e\u3057\u305f\uff08\u5b9f\u969b\u306b\u306f\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30b7\u30a7\u30eb\u4e0a\uff09 wiringPi\u3092pip\u304b\u3089\u3067\u306a\u304f\u30bd\u30fc\u30b9\u304b\u3089\u30d3\u30eb\u30c9\u3057\u305f\u308a\u3057\u3066\u3082\u6319\u52d5\u306f\u5909\u308f\u3089\u305a\u3001\u30cd\u30c3\u30c8\u3092\u691c\u7d22\u3057\u3066\u307f\u3066\u3082\u305d\u308c\u3089\u3057\u3044\u60c5\u5831\u304c\u306a\u304b\u306a\u304b\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u65b0\u3057\u3059\u304e\u3066wiringPi\u304c\u5bfe\u5fdc\u3057\u3066\u306a\u3044\u3063\u307d\u3044\u3068\u3044\u3046\u8a18\u4e8b\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002 WiringPi\u3067\u300cUnable to determine hardware version. I see: Hardware : BCM2835\u300d\u30a8\u30e9\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1058","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1058"}],"version-history":[{"count":1,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1058\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1058\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}