{"id":1991,"date":"2018-02-03T21:22:53","date_gmt":"2018-02-03T12:22:53","guid":{"rendered":"http:\/\/bezelie.com\/blog\/?page_id=1991"},"modified":"2018-02-25T13:09:01","modified_gmt":"2018-02-25T04:09:01","slug":"%e9%a1%8d%e3%82%92led%e3%81%a7%e5%85%89%e3%82%89%e3%81%9b%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"page","link":"http:\/\/bezelie.com\/blog\/?page_id=1991","title":{"rendered":"LED\u3067\u5149\u3089\u305b\u3066\u307f\u308b"},"content":{"rendered":"<p>\u3053\u3053\u3067\u306f\u3079\u30bc\u30ea\u30fc\u3092LED\u3067\u5149\u3089\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h5>\u6e96\u5099\u3059\u308b\u3082\u306e<\/h5>\n<p style=\"padding-left: 30px;\">\u30fbLED\u3000\uff08\u76f4\u5f845mm\u306e\u7832\u5f3e\u578b\uff09<br \/>\n\u30fb\u30b8\u30e3\u30f3\u30d1\u30fc\u30b1\u30fc\u30d6\u30eb<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-12.14.45w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2205\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-12.14.45w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-12.14.45w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-12.14.45w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-12.14.45w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9<\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1025\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/13-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/13-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/13.jpg 640w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/>\u30fb\u62b5\u6297\uff08470\u03a9\uff09<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/12-e1482046736636.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1024\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/12-e1482046736636-300x222.jpg\" alt=\"\" width=\"300\" height=\"222\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/12-e1482046736636-300x222.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/12-e1482046736636.jpg 337w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h5>\u63a5\u7d9a<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\uff2c\uff25\uff24\u306e\uff12\u672c\u306e\u811a\u306f\u9577\u3055\u304c\u7570\u306a\u308a\u307e\u3059\u304c\u3001\u9577\u3044\u307b\u3046\u3092\u30d7\u30e9\u30b9\u3001\u77ed\u3044\u307b\u3046\u3092\u30de\u30a4\u30ca\u30b9\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002\u9006\u3060\u3068\u5149\u308a\u307e\u305b\u3093\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u30e9\u30ba\u30d1\u30a4GPIO\u306e\u4e0b\u6bb5\u306e\u5de6\u304b\u3089\uff17\u756a\u76ee\uff08GPIO 24\uff09\u306bLED\u306e\u9577\u3044\u307b\u3046\u306e\u8db3\uff08\u30a2\u30ce\u30fc\u30c9\uff09\u3001\u305d\u306e\u771f\u4e0a\u306ePIN\u306b\u77ed\u3044\u307b\u3046\u306e\u8db3\uff08\u30ab\u30bd\u30fc\u30c9\uff09\u3092\u63a5\u7d9a\u3057\u307e\u3059\u3002LED\u306e\u524d\u3067\u3082\u5f8c\u3067\u3082\u3088\u3044\u306e\u3067\u3001\u9593\u306b\u62b5\u6297\u3092\u306f\u3055\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2124\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_output2-300x254.jpg\" alt=\"\" width=\"300\" height=\"254\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_output2-300x254.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_output2.jpg 591w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p style=\"padding-left: 30px;\"><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/09\/2016-09-24-21.08.38.jpg\">\u00a0<\/a>\u30fb\u672c\u5f53\u306f\uff2c\uff25\uff24\u306e\u7a2e\u985e\u306b\u3088\u3063\u3066\u9069\u5207\u306a\u62b5\u6297\u5024\u306e\u62b5\u6297\u3092\u9078\u3076\u3079\u304d\u306a\u306e\u3067\u3059\u304c\u3001470\u03a9\u306e\u62b5\u6297\u3067\u3042\u308c\u3070\u3001\u3060\u3044\u305f\u3044\u3069\u3093\u306aL\uff25\uff24\u3067\u3082\u5149\u3089\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3000sample_output1.py<\/h2>\n<h5>\u6a5f\u80fd<\/h5>\n<p style=\"padding-left: 30px;\">\u30fbLED\u3092\uff11\u3064\uff11\u79d2\u304a\u304d\u306b\u70b9\u6ec5\u3055\u305b\u307e\u3059\u3002<\/p>\n<h5>\u5b9f\u884c\u65b9\u6cd5<\/h5>\n<pre class=\"nums:false lang:python decode:true\">$ cd ~\/bezelie\/edgar\n$ python sample_output1.py<\/pre>\n<p style=\"padding-left: 30px;\">\u30fb\u6b62\u3081\u305f\u3044\u3068\u304d\u306f\u3001CTRL+C \u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h5 style=\"text-align: left;\">\u53e3\u3092\u5149\u3089\u305b\u3066\u307f\u308b<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\u30ab\u30e1\u30e9\u306e\u4e0b\u306b\u3001\u4e0b\u5411\u304d\u306bLED\u3092\u523a\u3059\u3053\u3068\u3067\u3001\u53e3\u3092\u5149\u3089\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.37.51w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2183\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.37.51w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.37.51w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.37.51w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.37.51w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/C3UV2y4qNU8\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<h5>\u984d\u3092\u5149\u3089\u305b\u3066\u307f\u308b<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\u984d\u3084\u9854\u3092\u5149\u3089\u305b\u305f\u3044\u5834\u5408\u306f\u3001\u30ab\u30e1\u30e9\u306e\u4ee3\u308f\u308a\u306bLED\u30dc\u30fc\u30c9\u3092\u523a\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/14.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1026\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/14-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/14-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2016\/12\/14.jpg 640w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.09.09w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2185\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.09.09w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.09.09w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.09.09w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.09.09w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h5>\u4f53\u3092\u5149\u3089\u305b\u3066\u307f\u308b<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\u3079\u30bc\u30ea\u30fc\u306e\u80cc\u4e2d\u306e\u7a74\u306b\u306f\u3001\u3061\u3087\u3046\u3069LED\uff08\u76f4\u5f845mm\u306e\u7832\u5f3e\u578b\uff09\u304c\u523a\u3055\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.30.14w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2181\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.30.14w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.30.14w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.30.14w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.30.14w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.27.19w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2180\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.27.19w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.27.19w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.27.19w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.27.19w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h5>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h5>\n<pre class=\"lang:python decode:true\">#!\/usr\/bin\/python\n# -*- coding: utf-8 -*-\n# Bezelie Sample Code for Raspberry Pi : \u51fa\u529b\u306e\u30b5\u30f3\u30d7\u30eb\n# GPIO 27\u30d4\u30f3\u3068GND\u306bLED\u306a\u3069\u3092\u63a5\u7d9a\u3057\u3066\u304b\u3089\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n# \u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\nfrom time import sleep                 # sleep(\u30a6\u30a7\u30a4\u30c8\u51e6\u7406)\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\nimport RPi.GPIO as GPIO                # GPIO(\u6c4e\u7528\u5165\u51fa\u529b\u7aef\u5b50)\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\n\n# \u521d\u671f\u8a2d\u5b9a\nGPIO.setmode(GPIO.BCM)                 # GPIO\u3092GPIO\u756a\u53f7\u3067\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u8a2d\u5b9a\nGPIO.setup(27, GPIO.OUT)               # GPIO\u306e27\u30d4\u30f3\u3092\u51fa\u529b\u30e2\u30fc\u30c9\u306b\u8a2d\u5b9a\n\n# \u30e1\u30a4\u30f3\u30eb\u30fc\u30d7\ndef main():\n  try:\n    print \"GPIO 27\u30d4\u30f3\u306e\u51fa\u529b\u3092\u4ea4\u4e92\u306b\u30aa\u30f3\u30aa\u30d5\u3057\u307e\u3059\"\n    while True:                        # \u7e70\u308a\u8fd4\u3057\u51e6\u7406\n      print \"\u30aa\u30f3\"\n      GPIO.output(27, True)\n      sleep (1)\n      print \"\u30aa\u30d5\"\n      GPIO.output(27, False)\n      sleep (1)\n  except KeyboardInterrupt:            # \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\uff0bC\u304c\u62bc\u3055\u308c\u305f\u5834\u5408\u306e\u51e6\u7406\n    print \"\u7d42\u4e86\u3057\u307e\u3057\u305f\"\n    GPIO.cleanup()                     # \u30dd\u30fc\u30c8\u3092\u30af\u30ea\u30a2\n\n# \u76f4\u63a5\u5b9f\u884c\u3055\u308c\u305f\u5834\u5408\u306e\u51e6\u7406\nif __name__ == \"__main__\":\n    main()\n<\/pre>\n<h5>\u9854\u3092\u5149\u3089\u305b\u3066\u307f\u308b<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\u76ee\u306e\u4f4d\u7f6e\u306eLED\u3092\u5149\u3089\u305b\u308b\u3053\u3067\u3001\u9854\u5168\u4f53\u3092\u5149\u3089\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u9ed2\u76ee\u30d1\u30fc\u30c4\u3092\u306f\u305a\u305b\u3070\u76ee\u3092\u30d3\u30ab\u30d3\u30ab\u3068\u5149\u3089\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u3061\u3087\u3063\u3068\u6016\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.24.29w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2188\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.24.29w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.24.29w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.24.29w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-11.24.29w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/njfs0Rg9EjM\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3000sample_led1.py<\/h2>\n<h5>\u6a5f\u80fd<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\uff11\u79d2\u3054\u3068\u306b\uff17\u8272\u306b\u5149\u3089\u305b\u308b\u3002<\/p>\n<h5>\u6e96\u5099<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\uff14\u672c\u8db3\u306e\u30ab\u30e9\u30fcLED\u3092\u4f7f\u3044\u307e\u3059\u3002\uff08LED\u3084\u30e9\u30ba\u30d1\u30a4\u3092\u5b88\u308b\u305f\u3081\u3001\u672c\u5f53\u306f\u62b5\u6297\u3092\u306f\u3055\u3080\u3079\u304d\u3067\u3059\u304c\u3001\u4e0b\u56f3\u3067\u306f\u7701\u7565\u3057\u3066\u307e\u3059\uff09<\/p>\n<h5><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_led1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2234\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_led1-300x267.jpg\" alt=\"\" width=\"300\" height=\"267\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_led1-300x267.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/sample_led1.jpg 485w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/h5>\n<h5>\u5b9f\u884c\u65b9\u6cd5<\/h5>\n<pre class=\"nums:false lang:python decode:true\">$ cd ~\/bezelie\/edgar\n$ python sample_led1.py<\/pre>\n<p style=\"padding-left: 30px;\">\u30fb\u6b62\u3081\u305f\u3044\u3068\u304d\u306f\u3001CTRL+C \u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h5>\u30d5\u30eb\u30ab\u30e9\u30fc\u3067\u984d\u3092\u5149\u3089\u305b\u3066\u307f\u308b<\/h5>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.40.37w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2184\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.40.37w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.40.37w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.40.37w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-10.40.37w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/7JzWqnAdKZg\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<h5>\u30d5\u30eb\u30ab\u30e9\u30fc\u3067\u4f53\u3092\u5149\u3089\u305b\u3066\u307f\u308b<\/h5>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-16.03.05w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2231\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-16.03.05w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-16.03.05w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-16.03.05w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-18-16.03.05w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/HGGo4MEATFI\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<h5>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h5>\n<pre class=\"lang:python decode:true \">#!\/usr\/bin\/python\n# -*- coding: utf-8 -*-\n# Bezelie Sample Code for Raspberry Pi : \u51fa\u529b\u306e\u30b5\u30f3\u30d7\u30eb\n# GPIO 16,20,21\u30d4\u30f3\u3068GND\u306bLED\u3092\u63a5\u7d9a\u3057\u3066\u304b\u3089\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n# \u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\nfrom time import sleep                 # sleep(\u30a6\u30a7\u30a4\u30c8\u51e6\u7406)\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\nimport RPi.GPIO as GPIO                # GPIO(\u6c4e\u7528\u5165\u51fa\u529b\u7aef\u5b50)\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\n\n# \u5909\u6570\nledRed = 16       # as Red\nledBlue = 20      # as Blue\nledGreen = 21     # as Green\ninterval = 0.5    # \u8272\u5909\u3048\u9593\u9694\n\n# \u521d\u671f\u8a2d\u5b9a\nGPIO.setmode(GPIO.BCM)\nGPIO.setup(ledRed, GPIO.OUT)\nGPIO.setup(ledBlue, GPIO.OUT)\nGPIO.setup(ledGreen, GPIO.OUT)\n\n# \u95a2\u6570\ndef ledOff():\n  GPIO.output (ledRed, False)\n  GPIO.output (ledBlue, False)\n  GPIO.output (ledGreen, False)\n  sleep(0.04)\n\n# \u30e1\u30a4\u30f3\u30eb\u30fc\u30d7\ndef main():\n  try:\n    while True:\n      print \"\u8d64\"\n      GPIO.output (ledRed, True)\n      sleep(interval)\n      ledOff()\n      print \"\u9752\"\n      GPIO.output (ledBlue, True)\n      sleep(interval)\n      ledOff()\n      print \"\u7dd1\"\n      GPIO.output (ledGreen, True)\n      sleep(interval)\n      ledOff()\n      print \"\u30de\u30bc\u30f3\u30bf\"\n      GPIO.output (ledRed, True)\n      GPIO.output (ledBlue, True)\n      sleep(interval)\n      ledOff()\n      print \"\u30b7\u30a2\u30f3\"\n      GPIO.output (ledBlue, True)\n      GPIO.output (ledGreen, True)\n      sleep(interval)\n      ledOff()\n      print \"\u9ec3\"\n      GPIO.output (ledGreen, True)\n      GPIO.output (ledRed, True)\n      sleep(interval)\n      ledOff()\n      print \"\u767d\"\n      GPIO.output (ledRed, True)\n      GPIO.output (ledBlue, True)\n      GPIO.output (ledGreen, True)\n      sleep(interval)\n      ledOff()\n      sleep (1)\n\n  except KeyboardInterrupt:\n    print \" \u7d42\u4e86\u3057\u307e\u3057\u305f\"\n    GPIO.cleanup()\n\nif __name__ == \"__main__\":\n    main()<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3053\u3067\u306f\u3079\u30bc\u30ea\u30fc\u3092LED\u3067\u5149\u3089\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 \u6e96\u5099\u3059\u308b\u3082\u306e \u30fbLED\u3000\uff08\u76f4\u5f845mm\u306e\u7832\u5f3e\u578b\uff09 \u30fb\u30b8\u30e3\u30f3\u30d1\u30fc\u30b1\u30fc\u30d6\u30eb \u30fb\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9 \u30fb\u62b5\u6297\uff08470\u03a9\uff09 \u63a5\u7d9a \u30fb\uff2c\uff25\uff24\u306e\uff12\u672c\u306e\u811a\u306f\u9577\u3055\u304c\u7570\u306a\u308a\u307e\u3059\u304c\u3001\u9577\u3044\u307b\u3046\u3092\u30d7 &hellip; <a href=\"http:\/\/bezelie.com\/blog\/?page_id=1991\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;LED\u3067\u5149\u3089\u305b\u3066\u307f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1991","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/1991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1991"}],"version-history":[{"count":13,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/1991\/revisions"}],"predecessor-version":[{"id":2505,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/1991\/revisions\/2505"}],"wp:attachment":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}