{"id":1746,"date":"2013-01-28T14:40:02","date_gmt":"2013-01-28T05:40:02","guid":{"rendered":"http:\/\/www.pinewell.jp\/wordpress\/?p=1746"},"modified":"2013-01-28T14:40:02","modified_gmt":"2013-01-28T05:40:02","slug":"raspberrypi%e3%81%ae%e3%83%aa%e3%83%a2%e3%82%b3%e3%83%b3%e5%8c%963","status":"publish","type":"post","link":"http:\/\/www.pinewell.jp\/wordpress\/?p=1746","title":{"rendered":"RaspberryPi\u306e\u30ea\u30e2\u30b3\u30f3\u53163"},"content":{"rendered":"<p>\u30ea\u30e2\u30b3\u30f3\u306eindex.html<\/p>\n<pre lang=\"php\" line=\"\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text\/html;charset=UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=5\">\n<title>\u30ea\u30e2\u30b3\u30f3<\/title>\n<script type=\"text\/javascript\">\n<!--\nfunction sendIr(cmdstr,port){\n    xmlhttp = new XMLHttpRequest();\n    xmlhttp.open('GET', 'sendIr.php?cmdstr='+cmdstr+'&port='+port, true);\n    xmlhttp.onreadystatechange = function()\n        {\n            if (xmlhttp.readyState == 4  && xmlhttp.status == 200)\n            {\n\n            }\n        }\n    xmlhttp.send(null);\n}\nfunction sendrs(cmdstr){\n\t\n    xmlhttp = new XMLHttpRequest();\n    xmlhttp.open('GET', 'sendrs.php?cmd='+cmdstr, true);\n    xmlhttp.onreadystatechange = function()\n       {\n            if (xmlhttp.readyState == 4  && xmlhttp.status == 200)\n            {\n\n            }\n        }\n    xmlhttp.send(null);\n}\n\n\/\/-->\n<\/script>\n<\/head>\n<body>\n<div style=\"text-align: center\">\u30c6\u30ec\u30d3<br>\n<hr>\n<INPUT type=\"Button\" value=\"\u96fb\u6e90ON\"       name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('TVPWR',3);\">\n<INPUT type=\"Button\" value=\"\u96fb\u6e90OFF\"      name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('1');\">\n<br>\n<INPUT type=\"Button\" value=\"\u30c1\u30e3\u30f3\u30cd\u30eb\u2191\"   name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('7');\">\n<INPUT type=\"Button\" value=\"\u30c1\u30e3\u30f3\u30cd\u30eb\u2193\"   name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('8');\">\n<br>\n<INPUT type=\"Button\" value=\"\u30dc\u30ea\u30e5\u30fc\u30e0\u2191\"   name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('TVVOU',3)\">\n<INPUT type=\"Button\" value=\"\u30dc\u30ea\u30e5\u30fc\u30e0\u2193\"   name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('TVVOD',3)\">\n<br>\n<INPUT type=\"Button\" value=\"Blu-Ray\"     name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('2');\">\n<INPUT type=\"Button\" value=\"LinkTheater\" name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('3');\">\n<br>\n<INPUT type=\"Button\" value=\"AVAMP\"       name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('4');\">\n<INPUT type=\"Button\" value=\"PS2\"         name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('5');\">\n<br>\n<INPUT type=\"Button\" value=\"Wii\"         name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('6');\">\n<INPUT type=\"Button\" value=\"\u5165\u529b\u5207\u66ff\"      name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('TVINP',3)\">\n<br>\n<INPUT type=\"Button\" value=\"\u5730\u30c7\u30b8\"        name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('9');\">\n<INPUT type=\"Button\" value=\"BS\"          name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('10');\">\n<br>\n<INPUT type=\"Button\" value=\"CS\"          name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('11');\">\n<INPUT type=\"Button\" value=\"\u6d88\u97f3\"          name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendrs('12');\">\n\n<hr>AV\u30a2\u30f3\u30d7<br>\n<INPUT type=\"Button\" value=\"\u96fb\u6e90\"          name=\"btnTVPOWOFF\" style=\"WIDTH: 290px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPPWR',1)\">\n<br>\n<INPUT type=\"Button\" value=\"\u30dc\u30ea\u30e5\u30fc\u30e0\u2191\"   name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPVOU',1)\">\n<INPUT type=\"Button\" value=\"\u30dc\u30ea\u30e5\u30fc\u30e0\u2193\"   name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPVOD',1)\">\n<br>\n<INPUT type=\"Button\" value=\"BD\/DVD\"      name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPBD',1)\">\n<INPUT type=\"Button\" value=\"CBL\/SAT\"     name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPCBL',1)\">\n<br>\n<INPUT type=\"Button\" value=\"STB\/DVR\"     name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPSTB',1)\">\n<INPUT type=\"Button\" value=\"GAME\"        name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPGAME',1)\">\n<br>\n<INPUT type=\"Button\" value=\"PC\"          name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPPC',1)\">\n<INPUT type=\"Button\" value=\"AUX\"         name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPAUX',1)\">\n<br>\n<INPUT type=\"Button\" value=\"AM\"          name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPAM',1)\">\n<INPUT type=\"Button\" value=\"FM\"          name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPFM',1)\">\n<br>\n<INPUT type=\"Button\" value=\"TV\/CD\"       name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPTV',1)\">\n<INPUT type=\"Button\" value=\"NET\"         name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPNET',1)\">\n<br>\n<INPUT type=\"Button\" value=\"USB\"         name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPUSB',1)\">\n<INPUT type=\"Button\" value=\"\"            name=\"\"  style=\"WIDTH: 142px; HEIGHT: 36px\" >\n<br>\n<INPUT type=\"Button\" value=\"\u2191\"           name=\"btnTVPOWOFF\" style=\"WIDTH: 290px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPUP',1)\">\n<br>\n<INPUT type=\"Button\" value=\"\u2190\"           name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPLEFT',1)\">\n<INPUT type=\"Button\" value=\"\u2192\"           name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPRIGHT',1)\">\n<br>\n<INPUT type=\"Button\" value=\"\u2193\"           name=\"btnTVPOWON\"  style=\"WIDTH: 290px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPDOWN',1)\">\n\n<br>\n<INPUT type=\"Button\" value=\"ENTER\"       name=\"btnTVPOWOFF\" style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPENT',1)\">\n<INPUT type=\"Button\" value=\"RETURN\"      name=\"btnTVPOWON\"  style=\"WIDTH: 142px; HEIGHT: 36px\" ONCLICK=\"sendIr('AMPRET',1)\">\n<\/div>\n<\/body>\n<\/html>\n<\/pre>\n<p>index.html\u304b\u3089ajax\u3067\u547c\u3070\u308c\u308bsendrs.php<\/p>\n<pre lang=\"php\" line=\"\">\n<?php\n\tif (!isset($_GET['cmd'])) { $cmd=1;} else {$cmd=$_GET['cmd'];}\t\t \n\texec(dirname(__FILE__).\"\/sendrc \".$cmd);\n?>\n<\/pre>\n<p>\u540c\u3058\u304fsendIr.php<\/p>\n<pre lang=\"php\" line=\"\">\n<?php\n\tif (!isset($_GET['cmdstr'])) { $cmdstr=\"NULL\";} else {$cmdstr=$_GET['cmdstr'];}\n\tif (!isset($_GET['port'])) { $port=1;    } else {$port=$_GET['port'];}\n\texec(dirname(__FILE__).\"\/sendIr \".$cmdstr.\" \".$port.\" \/dev\/ttyUSB0\");\n?>\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30b9\u30de\u30d5\u30a9\u3067\u3082\u30ea\u30e2\u30b3\u30f3\u304c\u5feb\u9069\u306b\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u3001AV\u30a2\u30f3\u30d7\u3068\u30c6\u30ec\u30d3\u3060\u3051\u3060\u304c\u3002<br \/>\n\u306a\u306b\u304b\u30b1\u30fc\u30b9\u3092\u4f5c\u3089\u306a\u3051\u308c\u3070\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ea\u30e2\u30b3\u30f3\u306eindex.html \u30ea\u30e2\u30b3\u30f3 \u30c6\u30ec\u30d3 AV\u30a2\u30f3\u30d7 index.html\u304b\u3089ajax\u3067\u547c\u3070\u308c\u308bsendrs.php \u540c\u3058\u304fsendIr.php \u3053\u308c\u3067\u3001\u30b9\u30de\u30d5\u30a9\u3067\u3082\u30ea\u30e2\u30b3\u30f3\u304c\u5feb\u9069\u306b\u3002 \u3068\u308a\u3042\u3048\u305a\u3001AV\u30a2\u30f3\u30d7\u3068\u30c6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1746","post","type-post","status-publish","format-standard","hentry","category-6"],"views":5736,"_links":{"self":[{"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1746","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1746"}],"version-history":[{"count":0,"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1746\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1746"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}