{"id":774,"date":"2015-06-29T18:35:41","date_gmt":"2015-06-29T09:35:41","guid":{"rendered":"https:\/\/hack.gpl.jp\/?p=774"},"modified":"2015-06-29T18:35:41","modified_gmt":"2015-06-29T09:35:41","slug":"post-774","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2015\/06\/29\/post-774.html","title":{"rendered":"pi2 \u3067LED"},"content":{"rendered":"
\u6211\u304c\u5bb6\u306b\u3082\u3001PI2 \u304c\u6765\u307e\u3057\u305f\u3002\u5f53\u521d\u3001GW\u660e\u3051\u306bRS\u3055\u3093\u306b\u767a\u6ce8\u3057\u3066\u304a\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u5fd9\u3057\u304f\u3066\u8377\u7269\u3092\u53d6\u308a\u306b\u3044\u304f\u6687\u304c\u7121\u304f\u3066\u307b\u3063\u3066\u304a\u3044\u305f\u3089\u3001\u8fd4\u54c1\u6271\u3044\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u3046\u3046\u3080\u3001\u3001\u3001<\/p>\n
<\/p>\n
\u3067\u3001\u3082\u3046\u4e00\u5ea6\u983c\u3080\u306e\u3082\u6c17\u304c\u5f15\u3051\u305f\u306e\u3067\u9001\u6599\u306a\u3069\u3092\u8003\u3048\u308b\u3068\u3001AliExpress \u3067\u983c\u3093\u3060\u307b\u3046\u304c\u9001\u6599\u5206\u3060\u3051\u5b89\u3044\u3063\u3066\u3053\u3068\u3082\u3042\u308a\u305d\u3063\u3061\u7d4c\u7531\u3067\u30b2\u30c3\u30c8\u3057\u307e\u3057\u305f\u3002\u30b1\u30fc\u30b9\u306f\u3001RS\u3055\u3093\u304b\u3089\u30b2\u30c3\u30c8\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n
<\/p>\n
\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002element14.com \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u3088\u3046\u3067\u3059\u306d\u3002<\/p>\n
<\/p>\n
\u6c17\u306b\u5165\u3063\u305f\u30b1\u30fc\u30b9\u306b\u53ce\u3081\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002\u3075\u305f\u306f\u306f\u3081\u8fbc\u307f\u5f0f\u3067\u3001\u30b1\u30fc\u30d6\u30eb\u306e\u5206\u3060\u3051\u3059\u304d\u307e\u304c\u3042\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u51fa\u305b\u307e\u3059\u3002<\/p>\n
<\/p>\n
GPIO Pin\u306e\u914d\u5217\u306f\u3001\u4ee5\u4e0b\u306e\u8868\u3092\u898b\u307e\u3057\u305f\u300201 pin \u306f\u5199\u771f\u3067\u3044\u3046\u3068\u3001\u5de6\u4e0b\u306e\u53f3\u5074\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n
<\/p>\n
\u30b3\u30fc\u30c9\u306f\u3001python \u3067rpi.GPIO \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n
#!\/usr\/bin\/env python\nimport RPi.GPIO as GPIO\nimport time\nGPIO.setmode(GPIO.BOARD)\nGPIO.setup(11, GPIO.OUT)\nwhile True:\n GPIO.output(11, True)\n time.sleep(2)\n GPIO.output(11, False)\n time.sleep(2)<\/pre>\n