tag:blogger.com,1999:blog-11015747643336609412024-03-19T12:12:30.366+09:00pachube-jpパッチベイ使いたいけど、英語がわからない。
それをどうにかする&自分の為の覚え書き。icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1101574764333660941.post-16097010256275415292010-03-13T05:09:00.002+09:002010-03-13T05:31:49.660+09:00SMSが使えるようになったよ!家の電気使用量や家の光センサーがある一定の数値以上になったら、携帯にお知らせがきたらいいのに、、、と思っていたそこのアナタ!<br /><br />http://community.pachube.com/node/390<br /><br />これでぱっちべいと携帯が繋がりました! (イギリスとアメリカでは!)<br /><br /><br />これから、メールにお知らせの機能もつくってくれるみたいなので、日本のみなさんはそれを待つのがいいでしょう。<br /><br />ぱっちべいにログイン。<br />http://apps.pachube.com/alert/このページで携帯番号を入力。<br />次のページに自分の携帯ばんごうらしきものがはいっているurlができるのでそれを、コピー。<br /><br />好きなフィード、フィードIDを見つけて、グラフの下にちっちゃーく<br /> <span class="right_graph"> <span style="color: rgb(204, 51, 204);" class="use_datastream">embed,history,triggers,etc</span><span style="color: rgb(204, 51, 204);"> </span> </span> とあるのでクリック。<br />すると下に色々でてきます。<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipx3pi4efkChTnZyyp4t7im8rS2BJiI_cKqxeX0fw4EQvWB3YnM5K2Fg89LFssnNJU1hsSdr_ovfmISjcvKxzHhCmw7_I_7787HZREnwwiIuyfYv0Nu22peoPJADWj0aNogPLTW8Go-y8/s1600-h/sms.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 516px; height: 66px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipx3pi4efkChTnZyyp4t7im8rS2BJiI_cKqxeX0fw4EQvWB3YnM5K2Fg89LFssnNJU1hsSdr_ovfmISjcvKxzHhCmw7_I_7787HZREnwwiIuyfYv0Nu22peoPJADWj0aNogPLTW8Go-y8/s320/sms.jpg" alt="" id="BLOGGER_PHOTO_ID_5447846636667881298" border="0" /></a><br />こんなんで、url にはさっきのurlをいれて、隣のドロップダウンメニューのやつでその数値が<br />それ以上になったら、それ以下になったら、同じだったら、変わったら、とか選べるので選ぶ。<br />50以上とか39以下とかの数値の指定はその横の枠に入れましょう。<br /><br />そして、横のボタンをクリックすると。おわり。<br />デバックのボタンをおすと、速攻で携帯にテキストが送られてきますよ!<br /><br />すごいべんり!!<br /><br /><br /><img src="file:///Users/aiki/Documents/usman/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A6%E3%82%99%E3%81%AF%E3%82%9A%E3%81%A3%E3%81%A1%E3%81%B8%E3%82%9A%E3%81%84/sms.jpg" alt="" /><img src="file:///Users/aiki/Documents/usman/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A6%E3%82%99%E3%81%AF%E3%82%9A%E3%81%A3%E3%81%A1%E3%81%B8%E3%82%9A%E3%81%84/sms.jpg" alt="" />icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-59056815559467281562010-03-13T04:47:00.003+09:002010-03-13T05:04:04.935+09:00PNGグラフの使い方http://www.pachube.com/feeds/<span style="color: rgb(204, 0, 0);">2640</span>/datastreams/<span style="color: rgb(0, 102, 0);">2</span>/history.png?w=<span style="color: rgb(0, 0, 153);">310</span>&h=<span style="color: rgb(204, 51, 204);">410</span>&g=true&b=true&c=<span style="color: rgb(255, 102, 0);">00xx00</span>&s=2&r=3<br /><br />最後の数字が<br />1だと過去1時間<br />2だと過去1日<br />3だと過去4日<br />4だと過去96日<br />のグラフになります。<br /><br />今最大96日のデータを蓄積になったんです。<br /><br />あと<br />赤のところの数字は好きなフィード(だいたい4桁だよね)を入れて。<br />緑のところの数字にはフィードID(だいたい1桁か2桁だよね)を入れて。<br />青のところの数字にはグラフ画像の縦幅を入れて。<br />ピンクのところの数字にはグラフ画像の横幅を入れて。<br />オレンジのところの数字にはウェブ色番号を入れて。<br /><br />どの情報をいれるか、どのサイズで表示するか、グラフをどの色で表示するか、が簡単に変更できます<br />。<img alt="http://www.pachube.com/feeds/2640/datastreams/2/history.png?w=310&h=410&g=true&b=true&c=00xx00&s=2&r=2" src="http://www.pachube.com/feeds/2640/datastreams/2/history.png?w=310&h=410&g=true&b=true&c=00xx00&s=2&r=2" /><br />この画像は上のURLから。icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-46865924555163383602010-03-13T04:27:00.002+09:002010-03-13T04:43:22.898+09:00ぱっちべいをつかったアート作品:Natural Fuse私もちょびつと一枚噛んでる作品なんですが、<br />ナチュラル フューズという作品です。<br />http://www.naturalfuse.org/<br /><br /><img src="file:///Users/aiki/Library/Caches/TemporaryItems/moz-screenshot.png" alt="" /><img src="http://www.naturalfuse.org/images/DSC_8367.jpg" alt="" longdesc="images/DSC_8367.jpg" /><span class="status-body"> <span class="actions"><div> <a id="status_star_2894867121" class="fav-action non-fav" title="favorite this tweet"> </a> </div></span> <span class="entry-content">ナチュラルフューズはプランターの植物が二酸化炭素を吸収する分、その分だけ電気を使用する事ができるようにするという感じのもので、植物がフューズの働き(電気の量を制限する)をします。<br /><br />個々のユニットはインターネットで繋がれています。<br /><br />このユニットを使っている誰かが電気を使いすぎると、このネットワークに加わっている誰かの植物が殺されてしまいます。(プランターの横にお酢のボトルがくっついてる)<br /><br />誰が自分勝手に電気をつかっているか、そういう事がこのサイトのマップを見ると判ります。<br />http://www.naturalfuse.org/<br />黒いマーカーが殺された植物で、赤いマーカーが自分勝手モードの人たち。黄色は謙虚モードな人たち。<br /><br />マーカーをクリックすると詳細が出ます。詳細のなかにurl(こんなかんじでhttp://www.pachube.com/feeds/2641)があるのでそれをクリックすると、さらに詳細がぱっちべいからみれます。<br /><br />下のグラフはぱっちべいから読み込んでます。というか総てのインフォはぱっちべいからよみこんでいます。<br /><br /><br /><br /></span></span>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-17019964496220547722009-07-30T02:07:00.001+09:002009-07-30T02:07:09.739+09:00パッチベイをもっと便利にするツール:アウトプット編<div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#001ee6" style="font: 12.0px Helvetica; color: #001ee6"><a href="http://apps.pachube.com/"><u>http://apps.pachube.com</u></a></font>/</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ここに行きますと、ぱっちべいと一緒に使えるいろんな技術の一覧がみれます。</div></div><div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; ">今回はアウトプット編。</span></font></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="font-size: 17px; font-weight: bold; ">Pachube viewer</span>パッチベイ ヴューアー<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; "><img src="cid:991BCA10-AF7E-449A-8746-89F87D284D48@local"></span></span></font></div><div>グーグルの作った携帯<span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 13px; "><a href="http://www.androidg1.org/"><font color="#da2867" style="color: rgb(218, 40, 103); ">G1/Android</font></a> mobile phone用のパッチベーヴューアーです。</span></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;">これでパッチベイデータを出先でみれます。</span></font></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="color: rgb(153, 153, 153); font-size: 11px; "><a href="http://www.rcreations.com/freeandroidgphoneg1applications"><font color="#da2867" style="color: rgb(218, 40, 103); ">click here for info</font></a></span></span></font></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="font-size: 17px; font-weight: bold; ">PachuBlog </span>パチュブログ<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; "><img src="cid:060C09CE-2576-441B-8378-8A2E6AD77721@local"></span></span></font></div><div>あなたのプログやサイトに好きなデータの過去24時間のグラフと今の値を貼付けられます。フラッシュで作られています。</div><div>好きなフィードIDやデータストリームID、色や題名をサイトで選んで、そのurlを自分のブログに貼付けるだけです。</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(153, 153, 153); font-family: Verdana; font-size: 11px; "><font color="#da2867" style="color: rgb(218, 40, 103); "><a href="http://apps.pachube.com/pachublog.html">lick here to use</a></font></span></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="font-size: 17px; font-weight: bold; ">Pachube Viz </span>パッチベイ ビズ<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; "><img src="cid:657FE525-C3F5-4186-AE54-CCACC3311E2C@local"></span></span></font></div><div>上記のパチュブログはフラッシュベースなので、ipod等では読み込めないのですが、こちらは大丈夫。</div><div>もっと細かいグラフがみれますし、自分でウィンドウのサイズも指定できます。</div><div>こんなのをサイトに埋め込みます。</div><div><script type="text/javascript" src="<a href="http://www.google.com/jsapi">http://www.google.com/jsapi</a>"></script><script language="JavaScript" src="<a href="http://apps.pachube.com/google_viz/viz.js">http://apps.pachube.com/google_viz/viz.js</a>"></script><script language="JavaScript">createViz(504,2,200,400,"1CFF9D");</script></div><div><span class="Apple-style-span" style="color: rgb(153, 153, 153); font-family: Verdana; font-size: 11px; "><a href="http://apps.pachube.com/google_viz/"><font color="#da2867" style="color: rgb(218, 40, 103); ">click here to use</font></a></span></div><div><br></div><div><span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 17px; font-weight: bold; ">iPhone Viewer </span>iphoneヴューアー<img src="cid:280FF1AB-813B-4463-992E-9BBFD8167771@local"></div><div>パッチベイのグラフ等 <span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 13px; ">iPhoneでみれます。ブックマークをホームにすると、ブラウザをたちあげてー、等の手間が省けてさくっとみれます。</span></div><div><br></div><div><br></div><div><span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 17px; font-weight: bold; ">Pachube2SketchUp </span>パッチベイトゥースケッチアップ</div><div>このプラグインをインストールすると、グーグルのフリー3Dモデリングソフトsketch upにパッチベイのデータを読み込ませて3Dモデルを変形させたりすることが出来ます。</div><div><span class="Apple-style-span" style="color: rgb(153, 153, 153); font-family: Verdana; font-size: 11px; "><a href="http://community.pachube.com/sketchup"><font color="#da2867" style="color: rgb(218, 40, 103); ">click here to use</font></a></span></div><div><br></div><div><br></div><div><br></div><div><span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 17px; font-weight: bold; ">Pachube Google Gadget</span>パッチベイグーグルガジェット</div><div>グーグルガジェットはあなたの<span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 13px; "><font color="#da2867" style="color: rgb(218, 40, 103); "><a href="http://www.google.com/ig">iGoogle</a>のホームページ、<span class="Apple-style-span" style="color: rgb(57, 57, 57); ">もしくウェブサイトにパッチベイのグラフ等のブログパーツを埋め込む事ができます。</span></font></span></div><div><font class="Apple-style-span" color="#393939" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="color: rgb(153, 153, 153); font-size: 11px; "><a href="http://apps.pachube.com/google_gadget/"><font color="#da2867" style="color: rgb(218, 40, 103); ">click here to install</font></a> </span></span></font></div><div><font class="Apple-style-span" color="#999999" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><font class="Apple-style-span" color="#999999" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><font class="Apple-style-span" color="#999999" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><font class="Apple-style-span" color="#999999" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; "><span class="Apple-style-span" style="color: rgb(57, 57, 57); font-family: Verdana; font-size: 17px; font-weight: bold; ">Trails </span>トレイルズ</span></span></font></div><div>リアルタイムに変化するデータグラフを兼ねた地図をウェブサイトやブログ等に埋め込む事ができます。</div><div>位置と数値が変動するデータの視覚化に向いています。</div><div>例えば、車や船等乗りもののデータ等。</div><div><span class="Apple-style-span" style="color: rgb(218, 40, 103); font-family: Verdana; font-size: 11px; "><a href="http://apps.pachube.com/trails/">click here to use</a></span></div><div><font class="Apple-style-span" color="#DA2867" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><font class="Apple-style-span" color="#DA2867" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; ">等の他にもありますが、割愛します。</span></span></font></div><div><font class="Apple-style-span" color="#DA2867" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><font class="Apple-style-span" color="#DA2867" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></div>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-63096881488051007922009-07-30T00:39:00.001+09:002009-07-30T01:19:56.497+09:00パッチベイをもっと便利にするツール:インプット編<a href="http://apps.pachube.com/">http://apps.pachube.com</a>/ <div>ここに行きますと、ぱっちべいと一緒に使えるいろんな技術の一覧がみれます。</div><div>データの入力は(input /add a feed)</div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(57, 57, 57); font-weight: bold;font-family:Verdana;font-size:17;" >Remote Control Arduino </span>リモートコントロールアルディノ<img src="cid:8A545F9A-4223-4E97-94D5-41BE34933AA4@local" /></div><div>アルディノ(<span class="Apple-style-span" style="color: rgb(218, 40, 103);font-family:Verdana;font-size:13;" ><a href="http://www.arduino.cc/">Arduino</a></span>)はイタリア産の廉価な<span class="Apple-style-span" style="font-size:13;"> <a href="http://en.wikipedia.org/wiki/Input/output"><span style="color: rgb(18, 49, 178);" >I/O</span></a> <span class="Apple-style-span" style="font-size:medium;">基盤です。簡単にUSBでコンピュータに繋げて(winもmacも出来ます)、LEDやセンサーや色々繋げて、プログラムをして、何か面白い物や便利なものを自分で作る事ができます。</span></span></div><div>アルディノにイーサネット(ケーブル)シールド、という別売りの基盤を合体させると<span class="Apple-style-span" style="color: rgb(57, 57, 57);font-family:Verdana;font-size:13;" ><span style="color: rgb(218, 40, 103);" ><span class="Apple-style-span" style="color: rgb(0, 0, 0);font-family:Helvetica;font-size:medium;" >、コンピュータを介さず、直接インターネットに繋ぐ事ができます。(もちろんそれようのプログラムを入れなければならないのですが)<br />ここでは、アルディノが繋げてあると仮定して、アルディノがデータを送る時の振りをすることができます。アルディノとパッチベイを使った何かを作った時に、確認作業などする時に便利です。<br /></span></span></span></div><div><span class="Apple-style-span" style="color: rgb(153, 153, 153);font-family:Verdana;font-size:11;" > <a href="http://community.pachube.com/files/arduino_controller.html"><span style="color: rgb(218, 40, 103);" >click here to use</span></a></span></div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(57, 57, 57); font-weight: bold;font-family:Verdana;font-size:17;" >Status2Pachube <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-weight: normal;font-family:Helvetica;font-size:medium;" >ステータストゥーパッチベイ、<img src="cid:16971D52-D4A5-461C-82FD-3C4DE486F8E9@local" /></span></span></div><div><span class="Apple-style-span" style="color: rgb(57, 57, 57);font-family:Verdana;font-size:13;" >AIM, MSN Messenger, Skype や Yahoo Messenger等のオンライン状況をパッチベイにつなげます。</span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;">例えばこれに更に、アルディノとLEDライトをつなげて、インテリアライトをつくってみましょう。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;">遠距離恋愛中の相手がオンラインになったら、ライトが赤く光って教えてくれます。これでコンピュータを付けっぱなしにしなくても相手の状況がわかりますね。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;"><span class="Apple-style-span" style="color: rgb(153, 153, 153);font-size:11;" ><a href="http://apps.pachube.com/online-status.html"><span style="color: rgb(218, 40, 103);" >click here to use</span></a> </span></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#999999;"><span class="Apple-style-span" style="font-size:11;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;"><span class="Apple-style-span" style="font-weight: bold;font-size:17;" >PachTweet </span>パッチトゥイート<span class="Apple-style-span" style="color: rgb(0, 0, 0);font-family:Helvetica;font-size:medium;" ><img src="cid:417DFDE1-4983-46B1-93AE-ED30C44EA351@local" /></span></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;">トゥイッター(twitter)のダイレクトメッセージからパッチベイにデータを送ります。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;">これを上手く使うと出先で携帯から、なんか色々とコントロールできたりします。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;">例えば、これに更にアルディノと家電機器のスイッチをつなげたりして、遠隔で洗濯機をまわしたりね。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;"><span class="Apple-style-span" style="color: rgb(153, 153, 153);font-size:11;" ><a href="http://apps.pachube.com/tweet.html"><span style="color: rgb(218, 40, 103);" >click here to use</span></a></span></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:180%;color:#393939;"><span class="Apple-style-span" style="font-size:17;"><b><br /></b></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;"><span class="Apple-style-span" style="font-weight: bold;font-size:17;" >CurrentCost2Pachube </span>カレントコストトゥーパッチベイ<span class="Apple-style-span" style="color: rgb(0, 0, 0);font-family:Helvetica;font-size:medium;" ><img src="cid:0C7D72BF-057F-4C64-86CE-35D7FF530488@local" /></span></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;"><a href="http://www.currentcost.com/"><span style="color: rgb(218, 40, 103);" >Current Cost</span></a> はイギリス等で売っている、家庭の総電気使用量を測る機器なんですが、これをもっているのならパッチベイとつなげて、お家の電気使用量等をウェブでモニターできます。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;">これも旅先で家を空けたときに便利です。「あれ?なんで家の電気つかわれてるの?」「お母さんが掃除にきてるんじゃない?」というかんじで。</span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#393939;"><span class="Apple-style-span" style="font-size:13;"><span class="Apple-style-span" style="color: rgb(153, 153, 153);font-size:11;" ><span style="color: rgb(218, 40, 103);" ><a href="http://community.pachube.com/currentcost">click here to download</a></span></span></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#da2867;"><span class="Apple-style-span" style="font-size:11;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:Verdana;font-size:100%;color:#da2867;"><span class="Apple-style-span" style="font-size:11;"><br /></span></span></div>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-61062514746564793202009-07-28T07:54:00.002+09:002009-07-30T01:21:12.100+09:00パッチベイ公式、日本語ページ<div style="margin: 0px;"><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:Helvetica;font-size:100%;" >今更ですが、、、 </span></div><div style="margin: 0px;"><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:Helvetica;font-size:100%;" >ぱっちべいのオフィシャルな日本語のページです。 </span></div><div style="margin: 0px;"><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 30, 230);font-family:Helvetica;font-size:100%;color:#001ee6;" ><a href="http://www.pachube.jp/"><u>http://www.pachube.jp/</u></a></span><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:Helvetica;font-size:100%;" > </span></div><div style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 14px;"><br /></div><div style="margin: 0px;"><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:Helvetica;font-size:100%;" >中国語のサイトもあります。 </span></div><div style="margin: 0px;"><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 30, 230);font-family:Helvetica;font-size:100%;color:#001ee6;" ><a href="http://www.pachube.cn/"><u>http://www.pachube.cn/</u></a></span><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:Helvetica;font-size:100%;" ><br /><br />でもこのページだけなので、やっぱりこのブログは必要なのです、、。<br />全日本語化はまだまだ先みたいです。<br /></span></div>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-65749843447120775202009-01-27T04:04:00.010+09:002009-02-18T20:03:46.548+09:00pachube&twitter ぱっちべいとトゥイッターのつなぎ方。twitterとpachubeがつながる様になりました。<br /><br />twitterからダイレクトメッセージ(DM)を<span class="entry-content"><a href="http://twitter.com/pachtweet">pachtweet</a>に送ると、パッチベイ上でメッセージや数値などが見れます。<br />それをフラッシュで読み込んで表示したり使い方は色々です。<br /><br />ーーーーー </span><span class="entry-content">パッチベイ側ですること</span><span class="entry-content"> ーーーーーーーーーーーー<br /><br />まず最初に、twitterの情報を入れておく場所をpachubeにて設定する事だけです。新しくfeedを作る、という事です。<br /><br />1、pachubeの自分のアカウントにログインしてください。</span><br /><span class="entry-content">そうしたら、下の方にある黄色い枠のなかの、</span><a href="http://www.pachube.com/feeds/new">CONNECT TO AN INPUT!</a>をクリックして新しいfeedを作るページに行きます。<br /><br />feed type : manual を選びます。<br />Feed title : aikiaiki twitter feed 等、適当にタイトルを付けます。<br />Description : ここは説明を適当に、無くても大丈夫です。<br /><br />最低、feed type とfeed titleがあれば良いです。<br />そうしたら、seve feed ボタンをクリックします。<br /><br />新しいfeedが出来ました。<br />urlの最後にある数字がfeedIDなので覚えててください。後で使います。<br /><br /><br />ーーーーー twitter 側でする事 ーーーーーーーーーーーーーーー<br /><br /><span class="entry-content"><br />1、twitterにログインしましょう。<br />ログインしたら、</span><a href="http://www.twitter.com/pachtweet" target="_new">@pachtweet</a>をフォローしましょう。<br />(簡単な仕方は、コメントの空欄に『follow pachtweet』と括弧内をコピペして送信。)<br /><br />2、次は公開つぶやきで、<a href="http://www.twitter.com/pachtweet" target="_new">@pachtweet</a>に『connect』と言います。<br />(簡単な仕方は、コメントの空欄に『@pachtweet connect』と括弧内をコピペして送信。)<br />これは一度だけでいいです。<br />その後2−3分で、<a href="http://www.twitter.com/pachtweet" target="_new">@pachtweet</a>から、ダイレクトメッセージで成功した旨の返信がきます。<br /><br /><br />3、<a href="http://www.twitter.com/pachtweet" target="_new">@pachtweet</a>にパッチベイのAPIキーをダイレクトメッセージにて送ります。<br />(簡単な仕方は、コメントの空欄に『<span style="text-decoration: underline;">dm pachtweet key</span> ここにあなたのAPIキー 』と括弧内をコピペして送信。(<span style="text-decoration: underline;">dm pachtweet key klj34h5724231345l1k4jh1jg5f34h5jhg52346hkjh446</span>)って感じに)<br /><br />(パッチベイのAPIキーを忘れた人へ:パッチベイのAPIキーは自分の情報類のある枠の中にsettingsという項目があるので、クリックすると見れます。長いランダムな数字とアルファベットの混合された一行です。)<br /><br />4、さて、下準備はすみました。早速メッセージを送ってみましょう。<br />ダイレクトメールを<a href="http://www.twitter.com/pachtweet" target="_new">@pachtweet</a>に送ります。書式はsetの後にひとスペース空けて、さっき作ったパッチベイの新しいfeedIDの数字を入れます。その後にひとスペース空けたらそこからはメッセージでも、コンマで区切って数値を入れても良し。<br /><br /><br /><i>例:set 1353 100,223,135,testtest</i><br /><br />送信したら、2−3分待ってから、さっき作ったパッチベイfeedのページをチェックしてみましょう。<br /><br /><img src="file:///Users/aiki/Library/Caches/TemporaryItems/moz-screenshot.jpg" alt="" /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFsTLsOsg_B-LiorsyQ-NsKsEeuZo-tFX6p7cmmoPOXlGHO3mcuiW9dO71_GEMkQXuU9To0BpWaMJWXFxy7I-9dwI0koUP8bs9f5kaQEx7slAzwHVB4BhCOhebvokJaws1Uv2CYMCjGPI/s1600-h/pachtweet.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 147px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFsTLsOsg_B-LiorsyQ-NsKsEeuZo-tFX6p7cmmoPOXlGHO3mcuiW9dO71_GEMkQXuU9To0BpWaMJWXFxy7I-9dwI0koUP8bs9f5kaQEx7slAzwHVB4BhCOhebvokJaws1Uv2CYMCjGPI/s320/pachtweet.jpg" alt="" id="BLOGGER_PHOTO_ID_5295692909061631266" border="0" /></a>先ほど送った数値やテキストがみえます。icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-39584000949936964632009-01-14T02:29:00.004+09:002009-01-14T06:51:35.636+09:00Remote project/リモート プロジェクトセカンドライフとギャラリーに設置されたイスとランプで空間同士をパッチベイで繋げる試みの作品。<br />リアルのイスの下にセカンドライフのイスの空間がつながってる。<br /><br />セカンドライフのイスを下からノックすると、現実のイスも下からノックされる。<br />現実のイスに座ると、セカンドライフのイスの下も暗くなる。もしくはイスの上面の湿度があがり、セカンドライフの空間に霧があらわれる。<br />セカンドライフのイスの下に小さいイスがあって、それに座ると、現実の空間も暗くなる(隣のライトが暗くなる)<br />セカンドライフで人が喋ると、現実の空間の湿度があがる。(ランプの下方の噴霧器がつく)<br />セカンドライフの風が現実の部屋に吹く(ランプに小型扇風機がついている)<br />等々。<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8V2-h6BzdyUR-_ahBS9PMgKmxp5I5u3T7SJvJ5SbKygI3-nC0EOM-A268DP8BWme7PU0ZHNqf_EgGKkDG6wORw-SuQdqi9Wf3f-CsHGl0UoR8pdSECPZqs51YtacfzKhIpGn_FzhvjFQ/s1600-h/chair1.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8V2-h6BzdyUR-_ahBS9PMgKmxp5I5u3T7SJvJ5SbKygI3-nC0EOM-A268DP8BWme7PU0ZHNqf_EgGKkDG6wORw-SuQdqi9Wf3f-CsHGl0UoR8pdSECPZqs51YtacfzKhIpGn_FzhvjFQ/s320/chair1.jpg" alt="" id="BLOGGER_PHOTO_ID_5290895406759426466" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6ZfJcRQSk6xvTgtC4WO_CsMwvRMVaRvZUZuNQeZwdRTQX_PWAPcpU9KpURuTCnclqJitYKM8pTos6LdZwOB13UcFbe9vjJoc-8ZAU6V7A157MZCqmZfPvjrbht4vMVx2SSE9zNXjMSI/s1600-h/remotechair-sl.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6ZfJcRQSk6xvTgtC4WO_CsMwvRMVaRvZUZuNQeZwdRTQX_PWAPcpU9KpURuTCnclqJitYKM8pTos6LdZwOB13UcFbe9vjJoc-8ZAU6V7A157MZCqmZfPvjrbht4vMVx2SSE9zNXjMSI/s320/remotechair-sl.jpg" alt="" id="BLOGGER_PHOTO_ID_5290895544402130402" border="0" /></a><br /><br /><br /><img src="file:///Users/aiki/Library/Caches/TemporaryItems/moz-screenshot.jpg" alt="" /><br /><object height="321" width="400"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=671359&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"><embed src="http://vimeo.com/moogaloop.swf?clip_id=671359&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="321" width="400"></embed></object><br /><a href="http://vimeo.com/671359">Remote</a> from <a href="http://vimeo.com/hdr">haque d+r</a> on <a href="http://vimeo.com/">Vimeo</a>.<br /><br /><br />詳細は<a href="http://www.haque.co.uk/remote.php">http://www.haque.co.uk/remote.php</a>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-22959311944379107582009-01-10T11:09:00.002+09:002009-01-10T11:10:11.438+09:00ぱっちべいって何?<h2>ぱっちべいへようこそ<span style="color: rgb(204, 204, 204);">Welcome to Pachube</span></h2> <!-- begin content --> <div class="content"> <p><b>ぱっちべい</b><a href="http://www.pachube.com/" title="http://www.pachube.com">http://www.pachube.com</a> はセンサーデータや、デバイス、建物や環境など世界中のデータをリアルタイムでつないだり、シェアするウェブサービスです。</p><p><img src="http://community.pachube.com/files/switchboard-new.jpg" border="1" /></p><p>pachubeの一番の目的は、離れたところに存在する(もしくはバーチャルにある)空間を簡単に繋げる事にあります。</p><p>”パッチベイ”は元々上の写真↑にある、オーディオ機器や電話等の接続を簡単につなぎ変えたりする為のコードと穴のいっぱいの機材の事です。</p><p>そんな感じに、地球上に溢れるあらゆるデータをつないだり、つなぎ変えたり、見たり、使えたりが、簡単に出来ます。</p><p><br /></p><p style="color: rgb(204, 204, 204);"><b>Pachube</b> is a web service available at <a href="http://www.pachube.com/" title="http://www.pachube.com">http://www.pachube.com</a> that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world.</p><p style="color: rgb(204, 204, 204);"><span style="color: rgb(0, 0, 0);">パッチベイはYouTubeみたいなもので、動画の代わりに”環境データ”やネットにつながれた”センサーデータ”等を生中継でつないでシェアしたり、過去のデータ(現時点では24時間分)も見たりできます。</span><span style="text-decoration: underline;"><br /></span></p><p>センサーからウェブにデータをリアルタイムでアップロードして、パッチベイのウェブサイトから閲覧したり、</p> <p>そのパッチベイサイトから、そのデータを別のデバイスに読み込ませて動作させたり、そのデータを別のサイトに反映させたり、ヴァーチャルな環境とリアルな環境をつなぐ事もできます。</p><p style="color: rgb(204, 204, 204);">The key aim is to facilitate interaction between remote environments, both physical and virtual. Apart from enabling direct connections between any two environments, it can also be used to facilitate many-to-many connections: just like a physical "patch bay" (or telephone switchboard) Pachube enables any participating project to "plug-in" to any other participating project in real time so that, for example, buildings, interactive installations or blogs can "talk" and "respond" to each other.</p><p>例えば、ここのページ<a href="http://www.pachube.com/feeds/504">http://www.pachube.com/feeds/504</a>には、とあるオフィスの部屋の湿度(<a href="http://www.pachube.com/feeds/504/datastreams/0/history.png"><span style="text-decoration: underline;">0</span></a>)、部屋の明るさ(<a href="http://www.pachube.com/feeds/504/datastreams/1/history.png"><span style="text-decoration: underline;">1</span></a>)、湿度(<a href="http://www.pachube.com/feeds/504/datastreams/2/history.png">2</a>)等がリアルタイムでグラフと数値で表示されています。<br /><span style="text-decoration: underline;"></span></p><p><a href="http://www.pachube.com/feeds/504"><br /></a></p><p>このfeed(パッチベイではアップロードされるデータをフィードと呼びます。)<a href="http://www.pachube.com/feeds/1230">http://www.pachube.com/feeds/1230</a>はNYの電気の卸価格を読み込んでいます。</p><br /><p>このfeedは<a href="http://www.pachube.com/feeds/1281">http://www.pachube.com/feeds/1281</a>セカンドライフに似た仮想空間にあるオブジェクトから、触られた回数(<a href="http://www.pachube.com/feeds/1281/datastreams/4/history.png">4</a>)空間に吹く風の向きと強さ(<a href="http://www.pachube.com/feeds/1281/datastreams/5/history.png">5</a>)、その物体から一番近くに居るアバターの距離(<a href="http://www.pachube.com/feeds/1281/datastreams/9/history.png">9</a>)、一番近くに居るアバターの名前(10)等が読み込まれています。</p><span style="text-decoration: underline;"></span> <p style="color: rgb(204, 204, 204);"><br /></p><p style="color: rgb(204, 204, 204);">Pachube is a little like YouTube, except that, rather than sharing videos, Pachube enables people to monitor and share real time environmental data from sensors that are connected to the internet. Pachube acts between environments, able both to capture input data (from remote sensors) and serve output data (to remote actuators). Connections can be made between any two environments, facilitating even spontaneous or previously unplanned connections. Apart from being used in physical environments, it also enables people to embed this data in web-pages, in effect to "blog" sensor data.</p> <p><img src="http://community.pachube.com/files/pachube_diagram.jpg" border="1" /></p> <p style="color: rgb(204, 204, 204);">Pachube makes use of Extended Environments Markup Language (EEML) and an EEML Processing library is available to connect directly to Pachube without needing to know or understand EEML. A basic API makes it possible to both serve and request data in CSV and EEML format. In addition, for those operating behind a firewall, or with non-static URLs, or who wish to update less frequently than usual, the API enables manual update by an HTTP PUT request.</p> <p style="color: rgb(204, 204, 204);">There is a tutorial available for beginner/intermediate Arduino and Processing users to connect Arduino to Pachube (both as an input and as an output).</p> <p style="color: rgb(204, 204, 204);">Relevant URLs:</p> <p style="color: rgb(204, 204, 204);">- <a href="http://www.pachube.com/" title="http://www.pachube.com/">http://www.pachube.com/</a> (the home of Pachube)<br />- <a href="http://haque.co.uk/pachube.php" title="http://haque.co.uk/pachube.php">http://haque.co.uk/pachube.php</a> (background)<br />- <a href="http://eeml.org/" title="http://eeml.org/">http://eeml.org/</a> (Extended Environments Markup Language)<br />- <a href="http://eeml.org/library/" title="http://eeml.org/library/">http://eeml.org/library/</a> (EEML library for Processing)</p> <p style="color: rgb(204, 204, 204);">More about <a href="http://community.pachube.com/?q=node/58">the team behind Pachube is available here</a>.</p> </div>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0tag:blogger.com,1999:blog-1101574764333660941.post-41386469091057406872008-05-29T01:02:00.005+09:002009-01-14T06:58:01.833+09:00flash アクションスクリプト3.0で、データを読み込む。このブログの一番上のタイトル画像は以下のスクリプトを使って作っています。<br />-----------------------------------<br /><br />フラッシュの一番最初のフレームに、<br />テキストダイナミックテキストエリアを作る。<br />そのテキストエリアにoutput_txtと名前をつける。<br /><br />csvにはxmlを入れてもいい。<br /><br />xmlのばあい、/*と*/で囲まれて隠されたグレーの範囲を使うといいかも。<br />そうすると、テキストエリアにとりあえず、数値が入ってきます。<br />ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<br /><br />var loader:URLLoader = new URLLoader();<br />loader.addEventListener(Event.COMPLETE, completeHandler);<br />loader.load(new URLRequest("http://www.pachube.com/api/<span style="color: rgb(255, 0, 0);">ここに読み込みたいフィードのナンバーを入れる</span>.<span style="color: rgb(0, 153, 0);">csv</span>?key=<span style="color: rgb(255, 0, 0);">ここにパッチベイからもらった自分のキーを入れる。</span>"));<br /><br />function completeHandler(event:Event):void {<br /><span style="color: rgb(102, 102, 102);"> /*try{</span><br /><span style="color: rgb(102, 102, 102);"> var xml:XML = new XML(event.target.data);</span><br /><span style="color: rgb(102, 102, 102);"> output_txt.text=xml;</span><br /><span style="color: rgb(102, 102, 102);"> </span><br /><span style="color: rgb(102, 102, 102);"> }catch (e:TypeError){</span><br /><span style="color: rgb(102, 102, 102);"> </span><br /><span style="color: rgb(102, 102, 102);"> output_txt.text = e.message;</span><br /><span style="color: rgb(102, 102, 102);"> }</span><br /><span style="color: rgb(102, 102, 102);"> */</span><br /> output_txt.text= event.target.data;<br /><br /> var item:String ="0";<br /> item =event.target.data;<br /> var arr:Array = item.split(",");<br /><br />var itemNum= arr.length;<br /> trace(itemNum);<br /><br /><br />}icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com2tag:blogger.com,1999:blog-1101574764333660941.post-73178667565417745252008-05-28T00:21:00.007+09:002008-05-28T01:49:15.729+09:00プロセッシング/アルディノ アプリケーション ステップバイ ステップ チュートリアル原文の下に日本語訳をおいておきます。<br />日本語が訳解らない場合は、上の英語をみてください。<br /><br /><br />========================<br /><span style="font-weight: bold;">Processing/Arduino application step-by-step</span><br /><span style="font-weight: bold;">プロセッシング/アルディノ アプリケーション ステップバイ ステップ チュートリアル</span><br /><br /><span style="color: rgb(192, 192, 192);">Here you will learn to build your own Pachube/Arduino/Processing application step-by-step, connecting Arduino to Processing to Pachube. This tutorial consists of two basic steps.</span><br />ここでは、Pachube(パッチベイ)、アルディノ、プロセッシングを使ったアプリケーションを一歩一歩勉強して行きます。<br /><br />このチュートリアルでは2つの基本的な事をして行きます。<br /><br /><span style="color: rgb(192, 192, 192);">Use Arduino to create an input to Pachube (i.e. provide Arduino's realtime sensor readings for others to connect to).</span><br /><br /><span style="color: rgb(204, 204, 204);">Use an output from Pachube to control Arduino (i.e. to have your Arduino respond to realtime sensor readings from remote devices).</span><br /><br />1、アルディノ側からパッチベイへ、インプットをする。(例:アルディノからのセンサー情報をリアルタイムでパッチベイに送る。)<br /><br />2、パッチベイからのアウトプットで、アルディノをコントロールする。(例:パッチベイからどこか離れたところに設置されているデバイスのセンサー情報をリアルタイムで受け取り、アルディノに反応させる)<br /><br /><span style="color: rgb(204, 204, 204);">Quickstart: All source files are available here. Inside this zipped folder are 5 Processing programmes. The first four are used in the explanations below; the fifth, arduinoInputOutput_Pachube_05 can be used as a quick start to create an applet that uses both inputs from and outputs to Pachube.</span><br />クイックスタート:すべてのソースファイルはここにあります。このZIPフォルダーのなかには5つ、プロセッシングのプログラムが入っています。<br /><br />最初の4つは以下に説明があります;5つ目の、arduinoInputOutput_Pachube_05を使うと、パッチベイに関わるインプットとアウトプットのアプレットを手っ取り早く作れます。<br /><br /><span style="color: rgb(204, 204, 204);">Please note that Pachube.com will be live and open to the public in Summer 2008; until then, it will not be possible to add a feed to the repository or receive data from Pachube feeds unless you are a beta-tester. Thank you! </span><br />(この Pachube.comは2008年夏に正規オープンいたします;それまでは貴方が”ベータテスターユーザー”になるまで、レポジトリやフィードを自由に加える、若しくはパッチベイのフィードデータを受け取る事はできません。 )<br /><br /><br />-----------------------------------------------------<br /><span style="color: rgb(204, 204, 204);">A. Using Arduino to create a Pachube input</span><br />A. アルディノを使ってパッチベイ・インプットを作る<br /><br /><span style="color: rgb(204, 204, 204);">This would enable your local sensor readings to be accessible to others in realtime.</span><br />自分の手元にあるセンサーのデータに他者がリアルタイムでアクセスできるようにします。<br /><br /><span style="color: rgb(204, 204, 204);">Part 1. Getting Arduino, Processing and Firmata up and running</span><br />パート1、アルディノの準備、プロセッシングとフィルマーターをインストールする。<br /><br /><span style="color: rgb(204, 204, 204);">upload Firmata to your Arduino. </span><br />1、Firmata(フィルマータ)を手元のアルディノにアップロードする。(フィルマータは、ardinoのファームウェアーソフトです。このファイルはardinoから開いてください)<br /><br /><span style="color: rgb(204, 204, 204);">make a simple light sensor circuit attached to analog pin 0 (something like this circuit would do fine).</span><br />2、シンプルな光センサー(CDSと抵抗で作られている)回路を作り、”アナログ・ピン0”に接続する(こんな感じの回路で大丈夫です)<br /><br /><span style="color: rgb(204, 204, 204);">download and install the Arduino library for Processing.</span><br />3、アルディノについてのプロセッシング・ライブラリー(Arduino library for Processing.)をダウンロードして、インストールする。(ダウンロードしたフォルダを、アルディノの”library”のフォルダにドラッグアンドドロップ(コピー&ペースト))<br /><br /><span style="color: rgb(204, 204, 204);">Use the following code as your initial Processing programme</span><br />:以下のコードをプロセッシングのプログラムのページにコピーする。<br />--------------------------------------------<br /><pre><code></code><pre><code></code></pre><br />import processing.serial.*;<br />import cc.arduino.*;<br /><br /><br /><br />Arduino arduino;<br />float myValue;<br /><br />void setup()<br />{<br />println(Arduino.list());<br />arduino = new Arduino(this, Arduino.list()[0], 57600);<br />}<br /><br />void draw()<br />{<br />myValue = arduino.analogRead(0);<br />println(myValue);<br />}<br /><pre><code></code><code></code></pre> </pre><br />------------------------------------------<br /><span style="color: rgb(204, 204, 204);">[Note: You can download the source files here and use arduinoInput_Firmata_01 for this exercise].</span><br />[注:このソースファイルをダウンロードできます。この場面で使っているのは”arduinoInput_Firmata_01”のフォルダの中のファイルです。]<br /><br /><span style="color: rgb(204, 204, 204);">Depending on which particular USB port is connected you'll have to change the '0' in the following line to the correct number</span><br />: 使用している正しいUSBポートの数字を”0”の所に書き入れる。<br /><br />-----------------------------------------------------------------<br />arduino = new Arduino(this, Arduino.list()[0], 57600);<br />-----------------------------------------------------------------<br /><span style="color: rgb(204, 204, 204);">You can find out what number to use there because when you run your Processing programme, the first thing it does ("println(Arduino.list());") is display a list of serial ports in your Processing console. Look for the one that says something like "/dev/tty.usbserial-A4001cKk".</span><br />ここで、それがどの数字かを知るには、貴方のプロセッシングのプログラムを走らせると判ります。<br />まず最初にする事は ("println(Arduino.list());") で、プロセッシングのコンソールに”シリアルポートのリスト”の表示をさせる事ができます。<br />そこで"/dev/tty.usbserial-A4001cKk"の様な記述を探してください。<br /><br /><span style="color: rgb(204, 204, 204);">If this is working correctly, you should see a value printed to your console several times a second that changes as you change the light level (or cover up the light sensor with your hand).</span><br />もしそれが上手くいった場合、コンソールに時々変化する数値が表示されます。ライトセンサーに手をかざし、その数値がかわるようであるならば、正解です。<br /><br /><span style="color: rgb(204, 204, 204);">Part 2. Adding the Arduino's realtime sensor reading to a Pachube feed</span><br />パート2、アルディノのセンサーのリアルタイム情報をパッチベイのfeedに加える。<br /><br /><span style="color: rgb(204, 204, 204);">Using the code above, you just need a few extra lines to get it ready for serving to the Pachube website. The procedure is:</span><br />上記にあるコードを使い、ほんの数行をパッチベイのサイトの為に準備します。<br /><br /><span style="color: rgb(204, 204, 204);">Install the EEML library for Processing.</span> <br />EEML library for Processingをインストールします。<br /><br /><span style="color: rgb(204, 204, 204);">Edit your previous code so that it looks like: </span><br />今あるコードを以下のように改訂します。<br /><br />ーーーーーーーーーーーーーーーーー<br /><pre><code></code><pre><code></code></pre><br />import processing.serial.*;<br />import cc.arduino.*; import eeml.*;<br /><br />Arduino arduino;<br />float myValue;<br /><br />DataOut dOut;<br /><br />void setup()<br />{<br />println(Arduino.list());<br />arduino = new Arduino(this, Arduino.list()[0], 57600);<br /><br />dOut = new DataOut(this, 5210);<br /><br />dOut.addData(0,"light sensor, LDR, light level");<br /><br />}<br /><br />void draw()<br />{<br />myValue = arduino.analogRead(0);<br />println(myValue);<br />}<br /><br />void onReceiveRequest(DataOut d){<br />d.update(0, myValue);<br />}<br /></pre><br /><br />ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<br /><span style="color: rgb(204, 204, 204);">[Note: You can download the source files here and use arduinoInput_Pachube_02 for this exercise].</span><br />[注:このソースファイルをダウンロードできます。この場面で使っているのは”arduinoInput_Pachube_02”のフォルダの中のファイルです。]<br /><br /><span style="color: rgb(204, 204, 204);">Looking at this additional code line by line:</span><br />以下のコードを見つけてください。<br />ーーーーーーーーーーー<br />import eeml.*;<br />ーーーーーーーーーーー<br /><br /><span style="color: rgb(204, 204, 204);">... imports the EEML library. (EEML is the data format used by Pachube. To see the full range of methods available, see the complete EEML documentation here).</span><br />EEMLライブラリーを読み込んでいます。( EEMLはパッチベイで使用されているデータフォーマットです。すべてのメソッドがあるかを見る為にはここを見てください、 EEMLドキュメント完全版はここです。 )<br />ーーーーーーーーーーーーーーー<br />DataOut dOut;<br />ーーーーーーーーーーーーーーー<br /><span style="color: rgb(204, 204, 204);">... initiates "dOut" which is a "DataOut" object. Basically this is an object that will handle all the information about data we want to send "outwards", i.e. that will be available for others to connect to via Pachube, and handles serving that data every time it's requested. </span><br />"dOut" を始める、"dOut"とは"DataOut"オブジェクトです。これはオブジェクトで、送りたいデータについてのすべての情報を処理します。例:パッチベイを通じて接続する他者の為、リクエストが来た時にデータ提供の処理もします。<br /><br />ーーーーーーーーーーーーーーーーーー<br />dOut = new DataOut(this, 5210);<br />ーーーーーーーーーーーーーーーーーー<br /><span style="color: rgb(204, 204, 204);">... creates the object dOut, specifying that it will serve on port 5210. (As an all-too-brief intro to 'ports' you should understand that, while your computer might have a single IP address, it has many different 'ports' each assigned to different types of network activity; e.g. 80 for serving web pages, 110 for POP mail activity, etc.). If for some reason 5210 is already in use by another application then you can choose any number, but try something higher in value rather than lower where they're more likely to be in use. By doing this, you computer will know that every time it gets a request on port 5210 it should forward that request to this Processing applet.</span><br />オブジェクト"dOut"を作ります。それが、ポート5210に情報を転送する事を指示しています。(自分のコンピュータが多分シングルIPアドレスを持っている事、それがいくつかの別のタイプのネットワークアクティビティを割り当てられた”ポート”を持つ(例えば80がウェブページ、110がPOPメールアクティビティを提供している等)事を理解してください。<br /><br />もし、他のアプリケーションに使われている等の理由で5210という数字が既に使われている場合、他のどの数字を選ぶ事ができます。しかし、高い数値の方が小さい数値よりも使われていない可能性があるので、そちらを選ぶ方がよいでしょう。<br /><br />この時、ポート5210はプロセッシングのアプレットにリクエストを毎回転送するのを貴方のコンピュータは感知します。<br /><br />ーーーーーーーーーーーーーーーーーーーーーーーーー<br />dOut.addData(0,"light sensor, LDR, light level");<br />ーーーーーーーーーーーーーーーーーーーーーーーーー<br /><span style="color: rgb(204, 204, 204);">... adds a new data stream to the feed. Its ID number is '0', and it is tagged by a comma-delimited list of descriptions. You can use whatever you like here to describe how this value should be listed on Pachube.</span><br />新しいデータをフィードにストリーミングします。IDナンバーが’0’、そしてカンマで区切られた後に、説明やタグを入力します。自分の好きな様にその変数に説明をつける事ができます。この説明のタグは自動的にパッチベイのサイト側にも反映されます。<br /><br />ーーーーーーーーーーーーーーーーーーーー<br />void onReceiveRequest(DataOut d){<br />d.update(0, myValue);<br />}<br />ーーーーーーーーーーーーーーーーーーーー<br /><span style="color: rgb(204, 204, 204);">... is the final chunk. When using the EEML library, you always need this as a callback function: basically this is the method that is called every time your Processing programme receives a request for data. (In case you have a number of different DataOut objects, operating on different ports, it also knows which particular one is being requested). The line "d.update(0,myValue);" is just saying something like "for DataOut object 'd', update stream '0' with the value of 'myValue'".</span><br />最後のコードですが、EEMLライブラリを使う時に、コールバックファンクションとして、いつも必要になります。これは毎回プロセッシングのプログラムがデータの為のリクエストを受け取った時に呼びだされるものです。(もし、複数のデータアウトオブジェクトや、オペレーティングポートを持っている場合、どれがリクエストを送ったのか解ります。)"d.update(0,myValue);"、この行が"データアウトオブジェクト’d’の為に、’0’と’myValuse’をストリミーングでアップデートします、という様な事を言っているだけです。<br /><br /><span style="color: rgb(204, 204, 204);">That's all there is to it! Of course you can add other pin readings, assigned to different float values and tag those each with their own descriptive tags. (They'll also each need their own new dOut.addData() and d.update(), but all sensor readings can be handled by the single dOut object). </span><br />以上です。もちろん、自分で他のセンサー入力のピン読み込みや、他の小数点の数値や、説明タグの割当も加える事ができます。(その時には、それらの為に各々dOut.addData() と d.update()が新しく必要になります。しかし全てのセンサー入力は一つのdOut objectで処理できます。)<br /><br /><span style="color: rgb(204, 204, 204);">Test locally first, to make sure it's serving correctly; the simplest way to do this is open up your browser and type in http://localhost:5210/ as the address. Most browsers should show the XML returned, looking something like this: </span><br />上手く送信されているか確かめる為に、ローカルでのテストをします。一番簡単なのはブラウザでhttp://localhost:5210/を開きます。ほとんどのブラウザでなら、以下のようなXMLが表示されるはずです。<br /><br />ーーーーーーーーーーーーーーーーーーーーーーーーーーー<br /><pre><code><br /><eeml xmlns="http://www.eeml.org/xsd/005" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd" version="5"><environment><data id="0"><tag><?xml version="1.0" encoding="UTF-8"?><br /><eeml xmlns="http://www.eeml.org/xsd/005"<br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />xsi:schemaLocation="http://www.eeml.org/xsd/005<br />http://www.eeml.org/xsd/005/005.xsd" version="5"><br /><environment><br /><data id="0"><br /><tag>light sensor</tag><br /><tag>LDR</tag><br /><tag>light level</tag><br /><tag>light dependent resistor</tag><br /><value>238.0</value><br /><unit> </unit><br /></data><br /></environment><br /></eeml><br /></tag></data></environment></eeml></code></pre><value></value><unit></unit><br />ーーーーーーーーーーーーーーーーーーーーーーーーーーー<br /><span style="color: rgb(204, 204, 204);">... though some (like Safari) only return the non-XML portion, which might look something like this: "light sensor LDR light level light dependent resistor 247.0". </span><br />サファリ等の一部のブラウザではnon-XML portionしか見れません。たぶん"light sensor LDR light level light dependent resistor 247.0"こんな感じの見た目です。<br /><br /><span style="color: rgb(204, 204, 204);">Don't worry about what any of this XML means -- it's only important to Pachube and you don't need to be able to read it yourself. The important thing is that it's working.</span><br />心配しなくても、これはPachube(パッチベイ)で読めるので大丈夫です。<br />重要なのはちゃんと動いているのかどうかなので。<br /><br /><span style="color: rgb(204, 204, 204);">If you get an error message, make sure that your Processing applet is actually running, and without errors.</span><br />もしエラーメッセージが来た場合、プロセッシングアプレットがちゃんと起動しているか、エラーが出ていないか確認してください。<br /><br /><span style="color: rgb(204, 204, 204);">The next step, once you're sure it's running locally is to make sure it's visible externally; i.e. outside of your computer. In order to do this, you need to know what your IP address is and to make sure that external traffic will reach your computer. </span><br />次のステップでは、ローカルで起動した時に、ちゃんと外部から見えるか確認します。<br />例えば、この為には自分のIPアドレスが何か、そして 自分のコンピューターの外からちゃんと自分コンピューターが見えるか確認します。<br /><br /><span style="color: rgb(204, 204, 204);">If your computer is directly connected to the internet (e.g. it's actually attached to the DSL modem) then chances are your external IP address is easy to find (as you can determine from System Preferences > Network (Mac OS X) or using Start > Run > cmd.exe > ipconfig /all (Windows); see http://www.simplehelp.net/2006/ 07/06/ how-to-determine- your-ip-or-mac- address-in-windows/ for more info). </span><br /><br />もし自分のコンピュータが直接DSLモデム等で接続されている場合は話は簡単で、<br />(Mac OS Xの場合、システムプレファレンス>ネットワーク、Windowsの場合、スタート>ラン>cmd.exe > ipconfig /allから探し出せます。( 詳しくはここを参照http://www.simplehelp.net/2006/ 07/06/ how-to-determine- your-ip-or-mac- address-in-windows/ )<br /><br /><span style="color: rgb(204, 204, 204);">If you think you now have the correct IP address, you can double check by going to http://whatismyip.com/ which should tell you automatically what your externally-visible IP address is.</span><br />もし正しいIPアドレスを知っているなら、http://whatismyip.com/でもう一度確認ができます。ここにアクセスするだけで自動的に外部から見た貴方のIPアドレスを教えてくれます。<br /><br /><span style="color: rgb(204, 204, 204);">If they correspond then all is good; if not it probably means you're on a local network.</span><br />もし以上の事で上手くいかない場合は、ローカルネットワークを使用している可能性があります。<br /><br /><span style="color: rgb(204, 204, 204);">If your IP address, as determined on your computer, looks anything like 192.168.xx.xx then that's definitely on a local network (i.e. it's not visible externally).</span><br />もしIPアドレスが 192.168.xx.xxの様な感じならば、それはローカルネットワーク(外部から見れません)です。<br /><br /><span style="color: rgb(204, 204, 204);">If you're on a local network, then you need to ensure that external traffic that requests port 5210 (or whichever port you used) is forwarded to your computer. This might require talking to your System Administrator or if you have access to your own router then basically you need to enable "port forwarding" for 5210 to your local IP address (e.g. 192.168.0.10). This procedure will vary from router to router and is not generally complex. For example to configure a Netgear router, see http://kbserver.netgear.com/kb_web_files/N101145.asp.</span><br />もしローカルネットワークならば、ポート5210(もしくは自分の必要とするいかなるポート)から外部通信を確保しなければなりません。<br />自分のシステム管理者に訊くか、ルーターを使用しているのならば、ポート5210からローカルIPアドレス(例:192.168.0.10)に "port forwarding(ポートの転送)"をしなければなりません。この手順はルーターの種類によって違ってきます。<br /><br />例えば、ネットギアのルーターを使用している場合は、http://kbserver.netgear.com/kb_web_files/N101145.aspを参照してください。<br />その他の人は、各々ルーターの設定をいじって、そのポートのアクセスを出来る様に、(例えばファイヤーウォールだったり)そのポート番号を例外的に認めるような設定をします。<br /><br /><span style="color: rgb(204, 204, 204);">If your external IP address changes frequently (i.e. it's "dynamic") you can also use a free service like DynDNS to create static hostname.</span><br />もし自分のIPアドレスが頻繁に変わる場合、 DynDNSの無料サービスを使って、通信ホストネームを作る事ができます。これを使った場合、そのもらったURLでパッチベイフィードに登録できます。<br /><br /><span style="color: rgb(204, 204, 204);">Once you know your IP address, and port forwarding is enabled you are ready to add your feed to the Pachube repository!</span><br />既にIPアドレスが解って居る人、もしくはポートの転送ができている人は、パッチベイ レポジトリー(Pachube repository!)にフィード(データをリアルタイムでアップロード)する事ができます。<br /><br /><span style="color: rgb(204, 204, 204);">To add your feed to Pachube, you need to:</span><br />パッチベイにフィードするには、<br /><span style="color: rgb(204, 204, 204);">first, login to Pachube or sign up.</span><br />まず、パッチベイにログインかサインアップします。<br /><br /><span style="color: rgb(204, 204, 204);">then select "Add an input" or go here.</span><br />その次に"Add an input" を選ぶ。<br /><br /><span style="color: rgb(204, 204, 204);">find your location on the map and double-click to add a new location.</span><br />ロケーションマップから、自分の居る場所を探し、ダブルクリックして新しくマーカを作ります。<br /><br /><span style="color: rgb(204, 204, 204);">type in your feed IP address and port, which might look something like 123.45.67.89:5210.</span><br />自分のIPアドレスとポート(こんな感じの123.45.67.89:5210)を入力する。(DynDNS等を使っている人はそこでもらったURLのようなものを入力)<br /><br /><span style="color: rgb(204, 204, 204);">fill in any other meta data about this feed (e.g. a description, a contact email address about it (if you wish it to be publicly available)).</span><br />その他の情報を入力する。(例:自分のセンサーの説明、光センサーとか、部屋の明るさ等、やメールアドレス、その他必要だと思う情報等)<br /><br /><span style="color: rgb(204, 204, 204);">click "Preview feed".</span><br />"Preview feed"をクリック。<br /><br /><span style="color: rgb(204, 204, 204);">verify that your light sensor reading is being read correctly by Pachube.</span><br />センサーの情報がちゃんとパッチベイに読み取られているか確認する。<br /><br /><span style="color: rgb(204, 204, 204);">once you're happy that the data is being read correctly, that it is tagged as desired, click "Submit feed". </span><br />以上問題なければ "Submit feed"をクリックします。<br /><br /><br /><span style="color: rgb(204, 204, 204);">You have now added your feed to the repository! Pachube will now give your feed a unique ID and a URL through which this feed may be accessed (so that you don't need to make your own IP address public). It will also log your sensor data whenever it is connected to the internet (so long as your IP address doesn't change!). You can now doing any of a number of things including:</span><br />これでレポジトリにフィードが追加されました。パッチベイからランダムなIDとURLが与えられます。(なので自分でIPアドレスを作る必要もありません) あなたのネット接続されているセンサーのログデータも(IPアドレスが変わらない限り)取ります。これから貴方は以下の事ができるようになりました。<br /><br /><span style="color: rgb(204, 204, 204);">build further devices on other remote computers that connect to this feed.</span><br />別のコンピュータで今のフィードに接続する、更なるデバイスを作る事ができます。<br /><br /><span style="color: rgb(204, 204, 204);">distribute the feed URL to others so that they can make devices that remotely connect to it.</span><br />このフィードのURLを色々な人に教えて、彼らが貴方のフィードとつながるデバイスを作ることができます。<br /><br /><span style="color: rgb(204, 204, 204);">enable the background colour of your webpage to change with the realtime sensor reading.</span><br />リアルタイムにウェブの背景の色等、デザインに変化を与える事ができます。<br /><br /><span style="color: rgb(204, 204, 204);">embed a graph of historical data from the sensor readings in your blog.</span><br />ブログ等にログやグラフを埋め込む事も出来ます。<br /><br /><span style="color: rgb(204, 204, 204);">be sure to check out the complete documentation for the EEML library to see other methods that can be applied to your DataOut object, including the ability to set geographical location data; add "units" information for sensor values; and provide maximum and minimum values expected for a particular stream.</span>icehttp://www.blogger.com/profile/09402397244853397831noreply@blogger.com0