前準備の部分(firmware update)
http://blog.mcmelectronics.com/post/Getting-Up-and-Running-with-the-Raspberry-Pi-Camera-Board#.VoQgVJMrJE4
実動作のコマンドとオプションについて
http://www.mztn.org/rpi/rpi23.html
動画の拡張子は.h264
https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspivid.md
2015年12月31日木曜日
2015年12月30日水曜日
2015年12月4日金曜日
wordpressにgoogle chart APIを利用してグラフを描く
Google Chart APIを使うとキレイに書ける
http://wp3.jp/2012/01/04/google-chart-api/
折れ線グラフ系はここを参照
https://developers.google.com/chart/interactive/docs/gallery/linechart
javascriptを埋め込むのはdivで囲むだけ。空行を作るとバグになる
http://www.fkfield.jp/technology/wordpress/wp002/
http://wp3.jp/2012/01/04/google-chart-api/
折れ線グラフ系はここを参照
https://developers.google.com/chart/interactive/docs/gallery/linechart
javascriptを埋め込むのはdivで囲むだけ。空行を作るとバグになる
http://www.fkfield.jp/technology/wordpress/wp002/
2015年12月1日火曜日
2015年10月28日水曜日
AWS
本家無料動画
https://aws.amazon.com/jp/training/intro_series/
AWSがわかるスライド
http://www.slideshare.net/HiroshiTakayama/aws-45311829
APN認定会社のブログ
http://www.cloud-koubou.jp/category/blog/page/4/
AWS本家の資料集
http://aws.amazon.com/jp/aws-jp-introduction/
EC2のスペックに関する説明が参考になる
http://www.slideshare.net/serverworks/aws-azurecloudstudyinfukuoka20120713?next_slideshow=1
EC2の設定から順に。Amazonの説明資料
http://www.slideshare.net/AmazonWebServicesJapan/aws-basic-20120629?next_slideshow=1
UIが古い。2012の資料だからな
これも古くてUIは違うが使える(玉川さん作成)
http://www.slideshare.net/kentamagawa/3amazon-ec2?related=3
https://aws.amazon.com/jp/training/intro_series/
AWSがわかるスライド
http://www.slideshare.net/HiroshiTakayama/aws-45311829
APN認定会社のブログ
http://www.cloud-koubou.jp/category/blog/page/4/
AWS本家の資料集
http://aws.amazon.com/jp/aws-jp-introduction/
EC2のスペックに関する説明が参考になる
http://www.slideshare.net/serverworks/aws-azurecloudstudyinfukuoka20120713?next_slideshow=1
EC2の設定から順に。Amazonの説明資料
http://www.slideshare.net/AmazonWebServicesJapan/aws-basic-20120629?next_slideshow=1
UIが古い。2012の資料だからな
これも古くてUIは違うが使える(玉川さん作成)
http://www.slideshare.net/kentamagawa/3amazon-ec2?related=3
2015年8月5日水曜日
Raspberry Pi: 無線LANの設定をコマンドラインのみでやる
https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
を書き換えるだけ、というお話
2015年7月20日月曜日
2015年7月3日金曜日
2015年6月27日土曜日
HTML: キャッシュのクリアについて
だいたい書いてあることは同じ
http://qa.atmarkit.co.jp/q/6365
http://hungred.com/how-to/tutorial-stop-caching-jquery-javascript/
で、クエリーを変更する(「違うファイルですよー」)も常套手段
http://yuki.silk.to/2006/04/000170.html
jQuerryを使うのは試していない
http://www.koikikukan.com/archives/2011/08/29-015555.php
http://qa.atmarkit.co.jp/q/6365
http://hungred.com/how-to/tutorial-stop-caching-jquery-javascript/
で、クエリーを変更する(「違うファイルですよー」)も常套手段
http://yuki.silk.to/2006/04/000170.html
jQuerryを使うのは試していない
http://www.koikikukan.com/archives/2011/08/29-015555.php
2015年6月23日火曜日
2015年6月20日土曜日
2015年6月19日金曜日
2015年6月17日水曜日
2015年6月12日金曜日
Mac, shellスクリプトで自動スクリーンショット
screencaptureを使って60秒毎にスクショを取るサンプルコード
http://yumulog.hatenablog.com/entry/2014/10/30/230110
screencaptureコマンドの詳細
http://qiita.com/South_STR/items/f4624134726eca839647
http://yumulog.hatenablog.com/entry/2014/10/30/230110
screencaptureコマンドの詳細
http://qiita.com/South_STR/items/f4624134726eca839647
Python, Facebookページに投稿する
このチュートリアルがシンプルでわかりやすい
http://nodotcom.org/python-facebook-tutorial.html
よくあるエラーの一例
http://stackoverflow.com/questions/8823049/facebook-graph-api-error
'publish_stream'とここでは書いてあるが'publish_pages'のことだと思われ(バージョンの問題かな)
このexampleに従うと「自分のアカウント」で投稿する
http://stackoverflow.com/questions/24052651/python-facebook-sdk-post-to-page
そのときのエラーの一例
http://stackoverflow.com/questions/19535885/oauth-exception-200-while-trying-to-post-to-groups-after-recent-facebook-mainte
「アプリの設定」でアプリ自体のpublicへの投稿を許可しておく必要がある(only meではダメ)
Facebookページへの写真投稿についてはハマった
HTTPのリクエストを自力で作るやつが結果的には容易だった
http://stackoverflow.com/questions/17691636/uploading-photos-or-videos-to-facebook-using-python
ここにあるのはvideosの例だけどphotosに書き換えればよい
あとは前述のこれ、
http://nodotcom.org/python-facebook-tutorial.html
のサンプルへの注記にあるようにappへのaccess tokenではなく、Facebookページに対するaccess tokenをゲットすればページ管理人として投稿できる
参考Graph APIのphoto部分のリファレンス
https://developers.facebook.com/docs/graph-api/reference/page/photos/
Facebook-SDKのリファレンス(post_wallはいいんだけどput_photoは使えなかった)
http://facebook-sdk.readthedocs.org/en/latest/api.html#put-photo
リファレンス全体(root node)
https://developers.facebook.com/docs/graph-api/reference/
http://facebook-sdk.readthedocs.org/en/latest/api.html#class-facebook-graphapi
http://nodotcom.org/python-facebook-tutorial.html
よくあるエラーの一例
http://stackoverflow.com/questions/8823049/facebook-graph-api-error
'publish_stream'とここでは書いてあるが'publish_pages'のことだと思われ(バージョンの問題かな)
このexampleに従うと「自分のアカウント」で投稿する
http://stackoverflow.com/questions/24052651/python-facebook-sdk-post-to-page
そのときのエラーの一例
http://stackoverflow.com/questions/19535885/oauth-exception-200-while-trying-to-post-to-groups-after-recent-facebook-mainte
「アプリの設定」でアプリ自体のpublicへの投稿を許可しておく必要がある(only meではダメ)
Facebookページへの写真投稿についてはハマった
HTTPのリクエストを自力で作るやつが結果的には容易だった
http://stackoverflow.com/questions/17691636/uploading-photos-or-videos-to-facebook-using-python
ここにあるのはvideosの例だけどphotosに書き換えればよい
あとは前述のこれ、
http://nodotcom.org/python-facebook-tutorial.html
のサンプルへの注記にあるようにappへのaccess tokenではなく、Facebookページに対するaccess tokenをゲットすればページ管理人として投稿できる
参考Graph APIのphoto部分のリファレンス
https://developers.facebook.com/docs/graph-api/reference/page/photos/
Facebook-SDKのリファレンス(post_wallはいいんだけどput_photoは使えなかった)
http://facebook-sdk.readthedocs.org/en/latest/api.html#put-photo
リファレンス全体(root node)
https://developers.facebook.com/docs/graph-api/reference/
http://facebook-sdk.readthedocs.org/en/latest/api.html#class-facebook-graphapi
2015年6月11日木曜日
python: 配列の追加、appendのアレコレ
基礎
http://www.pythonweb.jp/tutorial/list/index6.html
appendで多次元配列やキー付き配列を作る作り方が下の方に
https://docs.python.org/2/tutorial/datastructures.html
http://www.pythonweb.jp/tutorial/list/index6.html
appendで多次元配列やキー付き配列を作る作り方が下の方に
https://docs.python.org/2/tutorial/datastructures.html
2015年6月6日土曜日
LinuxマシンのWiFiの操作をコマンドラインでする
http://unix.stackexchange.com/questions/92799/connecting-to-wifi-network-through-command-line
Raspberry Piに関してはコレ実績あり
https://www.raspberrypi.org/learning/networking-lessons/lesson-3/README.md
sudo service networking restart
sudo ifup wlan0
Raspberry Piに関してはコレ実績あり
https://www.raspberrypi.org/learning/networking-lessons/lesson-3/README.md
sudo service networking restart
sudo ifup wlan0
2015年6月3日水曜日
pythonでwordpressに投稿
http://python-wordpress-xmlrpc.readthedocs.org/en/latest/overview.html#installation
ポストとページを操作する例
http://python-wordpress-xmlrpc.readthedocs.org/en/latest/examples/posts.html
*実際のxmlrpc.phpのURLはサーバーの情報をちゃんと調べる必要がある
エラー無しで動いた(2015/11/30)
まずコレで、その後に上記のリンクを参照してpublish
http://python-wordpress-xmlrpc.readthedocs.org/en/latest/overview.html
ポストとページを操作する例
http://python-wordpress-xmlrpc.readthedocs.org/en/latest/examples/posts.html
*実際のxmlrpc.phpのURLはサーバーの情報をちゃんと調べる必要がある
エラー無しで動いた(2015/11/30)
まずコレで、その後に上記のリンクを参照してpublish
http://python-wordpress-xmlrpc.readthedocs.org/en/latest/overview.html
2015年5月29日金曜日
JSONファイルを取り込む
色々な手段があるのだろうが、一番簡単で上手くいったのはコレ
http://www.openspc2.org/JavaScript/Ajax/Ajax_study/chapter03/006/index.html
サンプルコード内で参照しているxmlhttp.jsとやらはこちらに
http://www.openspc2.org/JavaScript/Ajax/Ajax_study/chapter02/005/index.html
jQueryの有望なようなんだがシンプルな解答にたどり着けなかった
http://directorblog.jp/archives/50960177.html
Node.jsもしかり。
http://www.openspc2.org/JavaScript/Ajax/Ajax_study/chapter03/006/index.html
サンプルコード内で参照しているxmlhttp.jsとやらはこちらに
http://www.openspc2.org/JavaScript/Ajax/Ajax_study/chapter02/005/index.html
jQueryの有望なようなんだがシンプルな解答にたどり着けなかった
http://directorblog.jp/archives/50960177.html
Node.jsもしかり。
open data
World Bank
http://datacatalog.worldbank.org/
San Mateoの環境データベース
https://data.smcgov.org/browse?category=Environment
http://datacatalog.worldbank.org/
San Mateoの環境データベース
https://data.smcgov.org/browse?category=Environment
Google Maps APIでオーバーレイ部分の消去
「非表示」ではなく「消去」
http://phpjavascriptroom.com/?t=ajax&p=googlemapsapiv3_overlays#a_remove
要するに参照先のデータアレイを空っぽにしてしまうということのようだ
mapオブジェクト自体を初期化すると地図自体をリロードするので(一度真っ白になる)見ててウザい。この方法が好ましい
http://phpjavascriptroom.com/?t=ajax&p=googlemapsapiv3_overlays#a_remove
要するに参照先のデータアレイを空っぽにしてしまうということのようだ
mapオブジェクト自体を初期化すると地図自体をリロードするので(一度真っ白になる)見ててウザい。この方法が好ましい
2015年5月27日水曜日
Javascriptの基礎
デバッグ
http://postd.cc/how-to-not-hate-javascript-tips-from-the-frontline/
色々リファレンス
http://www.ajaxtower.jp/js/
オブジェクトの取り扱い
http://d.hatena.ne.jp/nattou_curry_2/20090801/1249109261
演算子
http://ja.wikibooks.org/wiki/JavaScript/%E6%BC%94%E7%AE%97%E5%AD%90
配列の最後に要素を追加
http://www.24w.jp/study_contents.php?bid=javascript&iid=javascript&sid=array&cid=008
http://postd.cc/how-to-not-hate-javascript-tips-from-the-frontline/
色々リファレンス
http://www.ajaxtower.jp/js/
オブジェクトの取り扱い
http://d.hatena.ne.jp/nattou_curry_2/20090801/1249109261
演算子
http://ja.wikibooks.org/wiki/JavaScript/%E6%BC%94%E7%AE%97%E5%AD%90
配列の最後に要素を追加
http://www.24w.jp/study_contents.php?bid=javascript&iid=javascript&sid=array&cid=008
Google Maps API "Heatmap Layer"
Google公式ガイド
https://developers.google.com/maps/documentation/javascript/heatmaplayer?hl=ja
APIリファレンス
https://developers.google.com/maps/documentation/javascript/reference#HeatmapLayer
HTML + JSのサンプル
https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap
http://jsfiddle.net/EBQQH/
http://www.joyofdata.de/blog/interactive-heatmaps-with-google-maps-api/
Earthquake Mappingを事例にした説明
https://developers.google.com/maps/tutorials/visualizing/earthquakes?hl=ja
Google Maps APIを拡張した独自のAPI?(試してない)
http://www.heatmapapi.com/sample_googlev3.aspx
https://developers.google.com/maps/documentation/javascript/heatmaplayer?hl=ja
APIリファレンス
https://developers.google.com/maps/documentation/javascript/reference#HeatmapLayer
HTML + JSのサンプル
https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap
http://jsfiddle.net/EBQQH/
http://www.joyofdata.de/blog/interactive-heatmaps-with-google-maps-api/
Earthquake Mappingを事例にした説明
https://developers.google.com/maps/tutorials/visualizing/earthquakes?hl=ja
Google Maps APIを拡張した独自のAPI?(試してない)
http://www.heatmapapi.com/sample_googlev3.aspx
2015年5月2日土曜日
2015年4月25日土曜日
2015年4月21日火曜日
python, 日付文字列からUTCのタイムスタンプと比較できる形式に変換
http://qiita.com/__Bren/items/8d84cb2c56cb9f246eff
strptimeを使ってstruct_timeの形式にまず変換する
strptimeについては本家ドキュメントはここ
http://docs.python.jp/2/library/time.html#time.strptime
そこからcalendarモジュールを使ってエポックからの秒数に変換する
http://docs.python.jp/2/library/calendar.html#calendar.timegm
strptimeを使ってstruct_timeの形式にまず変換する
strptimeについては本家ドキュメントはここ
http://docs.python.jp/2/library/time.html#time.strptime
そこからcalendarモジュールを使ってエポックからの秒数に変換する
http://docs.python.jp/2/library/calendar.html#calendar.timegm
2015年4月17日金曜日
sqlite3, python: DBから特定の条件のものを削除
sqlite自体の文法はここ参照
http://www.dbonline.jp/sqlite/insert/index6.html
sqlite3を使ってpythonからどう書くかはここ参照
http://stackoverflow.com/questions/3977570/how-to-delete-record-from-table
http://www.dbonline.jp/sqlite/insert/index6.html
sqlite3を使ってpythonからどう書くかはここ参照
http://stackoverflow.com/questions/3977570/how-to-delete-record-from-table
2015年4月14日火曜日
2015年4月10日金曜日
Parse SDK for iOS
ここから落とした
https://www.parse.com/apps/quickstart#parse_data/mobile/ios/native/new
いろいろ抜けてるので追記必要
いきなりシミュレータが落ちた
setApplicationIdを追記したらok
http://stackoverflow.com/questions/26808248/parse-ios-sdk-you-have-to-call-setapplicationidclientkey-on-parse-to-config
よくよくみたら公式チュートリアルにも書いてあった。。。
オブジェクトの使い方を読めばだいたい必要なことはこなせる
https://www.parse.com/docs/jp/ios_guide#objects
https://www.parse.com/apps/quickstart#parse_data/mobile/ios/native/new
いろいろ抜けてるので追記必要
いきなりシミュレータが落ちた
setApplicationIdを追記したらok
http://stackoverflow.com/questions/26808248/parse-ios-sdk-you-have-to-call-setapplicationidclientkey-on-parse-to-config
よくよくみたら公式チュートリアルにも書いてあった。。。
オブジェクトの使い方を読めばだいたい必要なことはこなせる
https://www.parse.com/docs/jp/ios_guide#objects
iOSアプリの作り方を一個一個勉強する
storyboardの使い方の超基礎
http://techacademy.jp/magazine/1825
ボタンアクションを学ぶためにこれを続けて読んでみた
http://www.kyoji-kuzunoha.com/2013/02/xcode-app-4.html
Parseはここを読んだらだいたいわかった
https://www.parse.com/docs/jp/ios_guide#objects
http://techacademy.jp/magazine/1825
ボタンアクションを学ぶためにこれを続けて読んでみた
http://www.kyoji-kuzunoha.com/2013/02/xcode-app-4.html
Parseはここを読んだらだいたいわかった
https://www.parse.com/docs/jp/ios_guide#objects
2015年4月6日月曜日
Python スレッド(threading)を使って複数の非同期Timer処理を行う
http://www.python-izm.com/contents/application/thread.shtml
Timerで呼ぶ関数への引数の持たせ方
http://stackoverflow.com/questions/16578652/threading-timer
Eventを使ったフラグの持たせ方
http://bty.sakura.ne.jp/wp/archives/71
例外処理でdaemon = Trueが悪さする、という話
http://stackoverflow.com/questions/20596918/python-exception-in-thread-thread-1-most-likely-raised-during-interpreter-shutd
そもそもthreadの役割
http://docs.python.jp/2/library/threading.html
デーモンスレッド
http://www.confrage.com/java/thread/daemon_thread/daemon_thread.html
Timerで呼ぶ関数への引数の持たせ方
http://stackoverflow.com/questions/16578652/threading-timer
Eventを使ったフラグの持たせ方
http://bty.sakura.ne.jp/wp/archives/71
例外処理でdaemon = Trueが悪さする、という話
http://stackoverflow.com/questions/20596918/python-exception-in-thread-thread-1-most-likely-raised-during-interpreter-shutd
そもそもthreadの役割
http://docs.python.jp/2/library/threading.html
デーモンスレッド
http://www.confrage.com/java/thread/daemon_thread/daemon_thread.html
2015年4月4日土曜日
2015年4月3日金曜日
Arduinoで時間測定
1回実行時の測定と2回実行時の測定をすることで
差分でmills()コマンドの分を消すというノウハウ
http://homepage3.nifty.com/h-machida/digitalRead.html
差分でmills()コマンドの分を消すというノウハウ
http://homepage3.nifty.com/h-machida/digitalRead.html
2015年4月2日木曜日
2015年4月1日水曜日
2015年3月28日土曜日
気圧センサ
BMP085を使ったモジュールはけっこう色々売ってる。
3.3VのLDOを含んだもの、I2Cのレベルシフターを含んだもの
逆に言うと自分がどれを買ったのか注意が必要
https://www.adafruit.com/products/391
Adafruitのライブラリ
https://github.com/adafruit/Adafruit-BMP085-Library
BMP083のデータシート
http://www.adafruit.com/datasheets/BST-BMP085-DS000-06.pdf
接続は単純にWire.hで使うI2Cのポートに入れるだけ
http://blog.simtronyx.de/en/sensors-pressure-and-temperature-measurement-with-the-bmp085-gy-65-breakout-board/
海抜も測ることができて、理屈はここに書いてある
https://www.sparkfun.com/tutorials/253
ただしその日その時の海抜0m地点での気圧が必要(天気によって変動)
なのでまぁ参考程度か
海抜と標高について
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1411442419
3.3VのLDOを含んだもの、I2Cのレベルシフターを含んだもの
逆に言うと自分がどれを買ったのか注意が必要
https://www.adafruit.com/products/391
Adafruitのライブラリ
https://github.com/adafruit/Adafruit-BMP085-Library
BMP083のデータシート
http://www.adafruit.com/datasheets/BST-BMP085-DS000-06.pdf
接続は単純にWire.hで使うI2Cのポートに入れるだけ
http://blog.simtronyx.de/en/sensors-pressure-and-temperature-measurement-with-the-bmp085-gy-65-breakout-board/
海抜も測ることができて、理屈はここに書いてある
https://www.sparkfun.com/tutorials/253
ただしその日その時の海抜0m地点での気圧が必要(天気によって変動)
なのでまぁ参考程度か
海抜と標高について
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1411442419
2015年3月26日木曜日
2015年3月22日日曜日
JavascriptからPythonを呼ぶ
フォームに値を入れて送信、pythonで計算した結果を表示
http://creatornote.blog87.fc2.com/blog-entry-31.html
jqueryファイルの名前を自分がダウンロードしたバージョンに合わせて
変更するのを忘れずに
別のもう少し簡単なサンプル
http://creatornote.blog87.fc2.com/blog-entry-28.html
ローカルでCGIを動かすためのサーバーを立てる
http://creatornote.blog87.fc2.com/blog-entry-27.html
実行するファイルはpythonのままで良い
/cgi-bin/xxxx.pyと書いてあるが実際の場所はcig_serverを起動させたところから見て./cgi-bin
エラーの解決法
http://www.yukun.info/blog/2013/08/python-cgihttpserver.html
chmod 775をやっておくこと、改行はLF
↑
ここのソースにあるように一行目に#!/usr/local/env python
これも同じこと言っている。ハマりどころ
http://stackoverflow.com/questions/16120621/python-cgihttpserver-access-denied-on-os-x
http://creatornote.blog87.fc2.com/blog-entry-31.html
jqueryファイルの名前を自分がダウンロードしたバージョンに合わせて
変更するのを忘れずに
別のもう少し簡単なサンプル
http://creatornote.blog87.fc2.com/blog-entry-28.html
ローカルでCGIを動かすためのサーバーを立てる
http://creatornote.blog87.fc2.com/blog-entry-27.html
実行するファイルはpythonのままで良い
/cgi-bin/xxxx.pyと書いてあるが実際の場所はcig_serverを起動させたところから見て./cgi-bin
エラーの解決法
http://www.yukun.info/blog/2013/08/python-cgihttpserver.html
chmod 775をやっておくこと、改行はLF
↑
ここのソースにあるように一行目に#!/usr/local/env python
これも同じこと言っている。ハマりどころ
http://stackoverflow.com/questions/16120621/python-cgihttpserver-access-denied-on-os-x
2015年3月21日土曜日
2015年3月17日火曜日
GAE(Google App Engine)
SDKのダウンロード
https://cloud.google.com/appengine/downloads
ここのチュートリアルでほとんどできるはず
https://cloud.google.com/appengine/docs
https://cloud.google.com/appengine/downloads
ここのチュートリアルでほとんどできるはず
https://cloud.google.com/appengine/docs
2015年3月14日土曜日
DustセンサーとPM2.5、大気汚染関連
Dust sensor DSM501
http://store.cutedigi.com/dust-sensor/
PM2.5について正式な記載は無し
センサーの中身と値について
http://aqicn.org/sensor/shinyei/
スパイクの持続時間でparticleのサイズが推定可能だという仮説を立てている
Air Quality index (アメリカ政府主導)
http://www.airnow.gov/index.cfm?action=aqibasics.aqi
アメリカのみだがPM2.5のforecastなどを出している
indexと実際の値の換算
http://www.airnow.gov/index.cfm?action=resources.aqi_conc_calc
http://store.cutedigi.com/dust-sensor/
PM2.5について正式な記載は無し
センサーの中身と値について
http://aqicn.org/sensor/shinyei/
スパイクの持続時間でparticleのサイズが推定可能だという仮説を立てている
Air Quality index (アメリカ政府主導)
http://www.airnow.gov/index.cfm?action=aqibasics.aqi
アメリカのみだがPM2.5のforecastなどを出している
indexと実際の値の換算
http://www.airnow.gov/index.cfm?action=resources.aqi_conc_calc
CO2センサー
MG811の原理説明やら
http://www.spencerpages.com/wiki/index.php?title=MG811_Carbon_Dioxide_(CO2)_Sensor
CO2濃度(ppm)への計算のアレコレ
http://forums.parallax.com/archive/index.php/t-129979.html
SainSmartで買ったやつが不良品ぽく苦戦したやつの記録
http://forum.arduino.cc/index.php?topic=259751.0
DFRobotモジュールを使う際のインストラクション
http://www.dfrobot.com/wiki/index.php/CO2_Sensor_SKU:SEN0159
MQ-135とCO2の相関を検討したブログポスト
http://davidegironi.blogspot.com/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.VQMpcxDF9zM
MHZ14での測定結果を基準値として使用
http://www.futurlec.com/Datasheet/Sensor/MH-Z14.pdf
http://www.sensor-test.de/ausstellerbereich/upload/mnpdf/en/MHZ14_14.pdf
warm up time = 3min
MG811を使った例について書いている。サンプルコード回路図あり
http://sandboxelectronics.com/?p=147
http://www.spencerpages.com/wiki/index.php?title=MG811_Carbon_Dioxide_(CO2)_Sensor
CO2濃度(ppm)への計算のアレコレ
http://forums.parallax.com/archive/index.php/t-129979.html
SainSmartで買ったやつが不良品ぽく苦戦したやつの記録
http://forum.arduino.cc/index.php?topic=259751.0
DFRobotモジュールを使う際のインストラクション
http://www.dfrobot.com/wiki/index.php/CO2_Sensor_SKU:SEN0159
MQ-135とCO2の相関を検討したブログポスト
http://davidegironi.blogspot.com/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.VQMpcxDF9zM
MHZ14での測定結果を基準値として使用
http://www.futurlec.com/Datasheet/Sensor/MH-Z14.pdf
http://www.sensor-test.de/ausstellerbereich/upload/mnpdf/en/MHZ14_14.pdf
warm up time = 3min
MG811を使った例について書いている。サンプルコード回路図あり
http://sandboxelectronics.com/?p=147
2015年3月12日木曜日
2015年3月10日火曜日
PythonでSQLを使う
基礎で参考にsqlite3
http://www.lifewithpython.com/2013/10/sqlite3.html
数値ではなくカラム名での読み出し、メモリ上のみにテンポラリのDBを作成
http://www.mwsoft.jp/programming/python/sqlite3.html
特定カラムの値順で表示
http://www.python-izm.com/contents/external/sqlite.shtml
昇順降順の切り替え
http://www.w3schools.com/sql/sql_orderby.asp
細かい仕組みの説明あり
http://coreblog.org/ats/stuff/minpy_web/07/03.html
コマンド一覧的なもの
http://www.gesource.jp/programming/python/code/0013.html
MySQLならユーザー名、パスワードなどの管理も
http://www.python-izm.com/contents/external/mysql.shtml
カラムの追加
http://stackoverflow.com/questions/4253804/insert-new-column-into-table-in-sqlite
http://www.lifewithpython.com/2013/10/sqlite3.html
数値ではなくカラム名での読み出し、メモリ上のみにテンポラリのDBを作成
http://www.mwsoft.jp/programming/python/sqlite3.html
特定カラムの値順で表示
http://www.python-izm.com/contents/external/sqlite.shtml
昇順降順の切り替え
http://www.w3schools.com/sql/sql_orderby.asp
細かい仕組みの説明あり
http://coreblog.org/ats/stuff/minpy_web/07/03.html
コマンド一覧的なもの
http://www.gesource.jp/programming/python/code/0013.html
MySQLならユーザー名、パスワードなどの管理も
http://www.python-izm.com/contents/external/mysql.shtml
カラムの追加
http://stackoverflow.com/questions/4253804/insert-new-column-into-table-in-sqlite
2015年3月7日土曜日
2015年3月4日水曜日
robot用Metaタグの使い方
noindex, nofollow, noarchive
https://www.suzukikenichi.com/blog/how-to-use-meta-noindex-nofollow-noarchive/
nodir, noodp
https://www.suzukikenichi.com/blog/noydir-tag/
https://www.suzukikenichi.com/blog/how-to-use-meta-noindex-nofollow-noarchive/
nodir, noodp
https://www.suzukikenichi.com/blog/noydir-tag/
2015年3月3日火曜日
2015年3月1日日曜日
2015年2月28日土曜日
Raspberry Pi起動時に自動実行するスクリプト
http://qiita.com/inaBowBow/items/dca01622d086f113db00
これではエラーでダメだった
/etc/rc.localを書き換える方法
http://www.itmedia.co.jp/help/howto/linux/0007master/01/11.html
http://d.hatena.ne.jp/msr_humpy/20120705/1341496409
これもダメ
これで解決
http://mag.switch-science.com/2013/09/13/ipaddr_i2clcd_raspberry_pi/
/etc/network/if-up.dの下に実行権限与えて置くだけ
# autorun_scriptを残しておいたら悪さしたので消した
これ実績あり
http://tokunn.hateblo.jp/entry/2014/05/31/105531
ここのINIT INFOを追加
https://hirooka.pro/?p=5175
/etc/init.d/のautorun_script最下部に記載有り
これではエラーでダメだった
/etc/rc.localを書き換える方法
http://www.itmedia.co.jp/help/howto/linux/0007master/01/11.html
http://d.hatena.ne.jp/msr_humpy/20120705/1341496409
これもダメ
これで解決
http://mag.switch-science.com/2013/09/13/ipaddr_i2clcd_raspberry_pi/
/etc/network/if-up.dの下に実行権限与えて置くだけ
# autorun_scriptを残しておいたら悪さしたので消した
これ実績あり
http://tokunn.hateblo.jp/entry/2014/05/31/105531
ここのINIT INFOを追加
https://hirooka.pro/?p=5175
2015年2月27日金曜日
Pythonエスケープシーケンス
わかりやすいまとめ
http://www.pythonweb.jp/tutorial/string/index2.html
3つのダブルクォーテーションで複数行をそのまま変数に入れることできる
http://www.python-izm.com/contents/basis/string.shtml
\nとか\tとか書かなくて良い
http://www.pythonweb.jp/tutorial/string/index2.html
3つのダブルクォーテーションで複数行をそのまま変数に入れることできる
http://www.python-izm.com/contents/basis/string.shtml
\nとか\tとか書かなくて良い
2015年2月26日木曜日
Google Maps APIを使う
APIキーの取得
ここがとにかく丁寧
一番下にlocalhost上での動かし方も
「とりあえず表示」のサンプルコード
code1_1.jsとmap1_1.html
マーカーの配置
マーカーの色変更
Google Chart API
カスタマイズってほどではなく簡単にマーカーの見た目を変更できる
独自マーカー(pngファイルを表示)
./imgというのはhtmlファイルのディレクトリを基準とした場所のこと(./js/imgではない)
本家で紹介してるやり方の方が簡単かも
マーカーをクリックしたら情報ウィンドを表示
一番上のサンプルコード
情報ウィンドについてももうちょい詳細な
http://phpjavascriptroom.com/?t=ajax&p=googlemapsapiv3_infowindow
http://phpjavascriptroom.com/?t=ajax&p=googlemapsapiv3_infowindow
JSONファイルの読み込み
Parseでサーバ上にあるデータをローカルに引っ張ってくる
ライブラリのReadMeだけどここを読めば最低限のことはできる。
https://github.com/dgrtwo/ParsePy
少々気の利いたデータfetchの仕方はこちら参照
https://github.com/pktck/ParsePy
https://github.com/dgrtwo/ParsePy
少々気の利いたデータfetchの仕方はこちら参照
https://github.com/pktck/ParsePy
2015年2月19日木曜日
2015年2月7日土曜日
2015年2月5日木曜日
アメリカの医療保険の仕組みと用語
最もわかりやすかったのがここ
http://smartandresponsible.com/blog/how-to-select-health-insurance/
Blue ShieldとかBlue Crossとかの複雑な事情や経緯がなんとなくわかる
http://www.sj-ri.co.jp/issue/quarterly/data/qt42-1.pdf
http://www.sj-ri.co.jp/issue/quarterly/data/qt47.pdf
COBRAのこととか
http://www.kenkouhokenusa.com/
http://smartandresponsible.com/blog/how-to-select-health-insurance/
Blue ShieldとかBlue Crossとかの複雑な事情や経緯がなんとなくわかる
http://www.sj-ri.co.jp/issue/quarterly/data/qt42-1.pdf
http://www.sj-ri.co.jp/issue/quarterly/data/qt47.pdf
COBRAのこととか
http://www.kenkouhokenusa.com/
Windows8 マシンにPyBluezをセッティングするまでの時系列メモ
まずは手元のVistaで実験(ZBOXは動作遅いので色々試すとストレスになる)
とりあえずここを参考にターミナル(MSYS)を入れてみる
http://tanakh.jp/posts/2011-11-15-windows-terminal.html
ここにあるインストーラーを使った
https://code.google.com/p/mintty/downloads/list
https://code.google.com/p/mintty/downloads/detail?name=mintty-1.1.2-msys.zip&can=2&q=
Pythonはこちらから
https://www.python.org/downloads/release/python-279/
環境変数に;C:\Python27を追加
ここ参照
http://next.matrix.jp/config-path-win7.html
MSYSはうまく入らなかったがPythonはコマンドプロンプトでも起動可能
cygwinからも起動できた
Bluetoothのモジュールはここからダウンロード
https://code.google.com/p/pybluez/
これ参考にimportまでは成功したが、仮想環境上で動かしていたのでそこでコケた
http://homepages.ius.edu/RWISMAN/C490/html/PythonandBluetooth.htm
これを解決するのは骨が折れそうなのでやめる
この頃にZBOXやめとくかという話になっていたので
Windows8タブレット(最終的に動かすもの)に移行。
ターミナルはMSYSのロケーションがよくわからんので
もうコマンドプロンプトを使うことにする(衝撃)
Pythonは3.4を落としてみたらprint文の文法の仕様が変わっててめんどいので
http://stackoverflow.com/questions/25445439/what-does-syntaxerror-missing-parentheses-in-call-to-print-mean-in-python
やはり前述と同じ2.7にする
で、同様にPyBluezのセットアップをしてここのサンプルコードを実行してみるが
http://homepages.ius.edu/RWISMAN/C490/html/PythonandBluetooth.htm
ここら辺の情報を参考にして、
http://stackoverflow.com/questions/4198203/pybluez-does-not-detect-the-built-in-bluetooth-adapter
https://cnweb.wordpress.com/
一度デフォルトで入っているBluetoothのドライバを消して、
Broadcomのサイトから引っ張ってきたドライバをインストール
http://support.lenovo.com/us/en/downloads/ds039505
(機種ごとに依存。これはLenovoのMiix用)
これで解決。
とりあえずここを参考にターミナル(MSYS)を入れてみる
http://tanakh.jp/posts/2011-11-15-windows-terminal.html
ここにあるインストーラーを使った
https://code.google.com/p/mintty/downloads/list
https://code.google.com/p/mintty/downloads/detail?name=mintty-1.1.2-msys.zip&can=2&q=
Pythonはこちらから
https://www.python.org/downloads/release/python-279/
環境変数に;C:\Python27を追加
ここ参照
http://next.matrix.jp/config-path-win7.html
MSYSはうまく入らなかったがPythonはコマンドプロンプトでも起動可能
cygwinからも起動できた
Bluetoothのモジュールはここからダウンロード
https://code.google.com/p/pybluez/
これ参考にimportまでは成功したが、仮想環境上で動かしていたのでそこでコケた
http://homepages.ius.edu/RWISMAN/C490/html/PythonandBluetooth.htm
これを解決するのは骨が折れそうなのでやめる
この頃にZBOXやめとくかという話になっていたので
Windows8タブレット(最終的に動かすもの)に移行。
ターミナルはMSYSのロケーションがよくわからんので
もうコマンドプロンプトを使うことにする(衝撃)
Pythonは3.4を落としてみたらprint文の文法の仕様が変わっててめんどいので
http://stackoverflow.com/questions/25445439/what-does-syntaxerror-missing-parentheses-in-call-to-print-mean-in-python
やはり前述と同じ2.7にする
で、同様にPyBluezのセットアップをしてここのサンプルコードを実行してみるが
http://homepages.ius.edu/RWISMAN/C490/html/PythonandBluetooth.htm
IOError: No Bluetooth adapter detected
のエラーで動かない。ここら辺の情報を参考にして、
http://stackoverflow.com/questions/4198203/pybluez-does-not-detect-the-built-in-bluetooth-adapter
https://cnweb.wordpress.com/
一度デフォルトで入っているBluetoothのドライバを消して、
Broadcomのサイトから引っ張ってきたドライバをインストール
http://support.lenovo.com/us/en/downloads/ds039505
(機種ごとに依存。これはLenovoのMiix用)
これで解決。
2015年2月2日月曜日
Mac上でPythonでBluetooth
PyBluezは使えないのでLightBlueにしようという話
http://stackoverflow.com/questions/21695901/pybluez-installation-errors-on-mac-os
サンプルコード
https://github.com/0-1-0/lightblue-0.4/tree/master/examples
http://stackoverflow.com/questions/21695901/pybluez-installation-errors-on-mac-os
サンプルコード
https://github.com/0-1-0/lightblue-0.4/tree/master/examples
2015年1月28日水曜日
Raspberry Piにlibusbをinstallする
こっちが正解
http://stackoverflow.com/questions/4853389/how-to-install-libusb-in-ubuntu
本家から落としてもイマイチセットアップがわからなかった
http://www.libusb.org/
http://stackoverflow.com/questions/4853389/how-to-install-libusb-in-ubuntu
本家から落としてもイマイチセットアップがわからなかった
http://www.libusb.org/
2015年1月27日火曜日
英語役職を日本に当てはめると
全部は網羅できていないがわかりやすい
http://blog.kwbt.org/2010/03/blog-post.html
かなりざっくりだが偉さの順がわかる
http://itpro.nikkeibp.co.jp/article/Watcher/20070215/262079/
整理されている
http://www.daijob.com/tipsadvice/resume_wordbook/title.html
http://blog.kwbt.org/2010/03/blog-post.html
かなりざっくりだが偉さの順がわかる
http://itpro.nikkeibp.co.jp/article/Watcher/20070215/262079/
整理されている
http://www.daijob.com/tipsadvice/resume_wordbook/title.html
Raspberry Piでグラフ表示のpylabを使う
matplotlibをインストールすべき、というオチ
http://wyolum.com/numpyscipymatplotlib-on-raspberry-pi/
http://wyolum.com/numpyscipymatplotlib-on-raspberry-pi/
Raspberry PiにSSHで『ホスト名』でアクセスする
ここで解決
http://openrtm.org/openrtm/ja/node/266
apt-get updateを先にしなければならないというのがポイント
設定後は再起動
その他、sambaの設定とかw
http://www.shellvalley.0t0.jp/micro_comp/raspberrypi/first_setup.html
http://openrtm.org/openrtm/ja/node/266
apt-get updateを先にしなければならないというのがポイント
設定後は再起動
その他、sambaの設定とかw
http://www.shellvalley.0t0.jp/micro_comp/raspberrypi/first_setup.html
Linkit ONEのライブラリとサンプルコード
面白そうなライブラリとサンプルコードが並んでるんだが時間がないので後回し。。。
https://github.com/Seeed-Studio/LinkIt-ONE-IDE/tree/master/libraries
GoogleSpreadsheetにデータを直接送るやつとか
https://github.com/Seeed-Studio/LinkIt-ONE-IDE/blob/master/libraries/Bridge/examples/Temboo/SendDataToGoogleSpreadsheet/SendDataToGoogleSpreadsheet.ino
https://github.com/Seeed-Studio/LinkIt-ONE-IDE/tree/master/libraries
GoogleSpreadsheetにデータを直接送るやつとか
https://github.com/Seeed-Studio/LinkIt-ONE-IDE/blob/master/libraries/Bridge/examples/Temboo/SendDataToGoogleSpreadsheet/SendDataToGoogleSpreadsheet.ino
2015年1月21日水曜日
2015年1月20日火曜日
登録:
投稿 (Atom)