2015-11-01から1ヶ月間の記事一覧

Tabhost内のFragmentを動的に変更する

http://stackoverflow.com/questions/18120510/dynamically-changing-the-fragments-inside-a-fragment-tab-host

Arduinoとラダー回路でD/A変換する

3bit http://homepage3.nifty.com/mitt/pic/pic7_16.html 8bit http://homepage3.nifty.com/mitt/pic/pic5_12.html 周波数が決め打ちならCR発振回路でやる方法もあるかも

Windows8.1のキーボードでCapsとCtrlを入れ替える

regedit.exe ~/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/KeyboardLayout/Scancode Mapという名のバイナリ値を作成、編集CapsとCtrlを入れ替えたい場合 00 00 00 00 00 00 00 00 03 00 00 00 1d 00 3a 00 3a 00 1d 00 00 00 00 00 両方共Ctrlに…

Edison上でArduinoコードとNode.jsコードを通信させるには

https://communities.intel.com/thread/62908 MQTTプロトコルを使えとのこと You can run a Pub/Sub client in Arduino using MQTT (ex. Arduino Client for MQTT « knolleary and then have another one on the NodeJS side (mqtt) receiving the data that…

Edisonのカーネルモジュールをビルドする

How to build a kernel module on the Edison? https://communities.intel.com/message/295048Yocto Project Linux Kernel Development Manual http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modulesINTEL® E…

Edisonのカーネルをビルドする

http://qiita.com/yoneken/items/88165cebbadcc8d6878c $ make edison-image(Added Nov 26th) Building Edison image seems currently only possible on 64bit linux...crush log (on 32bit Ubuntu) cat /home/fab/Downloads/edison-src/build/tmp/work/core…

Arduino IDEのEdisonに対する挙動

#!/bin/sh # # clupload script to invoke lsz # Copyright (C) 2014 Intel Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the…

Ubuntu14.04でflashall.shして文鎮Edisonを復旧する

ここを参考に http://qiita.com/key/items/900bfc6dc6b660c50e2f Ubuntuにdfu-util0.8を入れたらできた(apt-getで入るのは0.5)dfu-util http://dfu-util.sourceforge.netlibusb-1.0.9 http://www.libusb.org sudo ./flashall -v

Virtual BoxがVERR_SUPLIB_OWNER_NOT_ROOTとなって起動しない

ここを参考に http://okogeki.hatenablog.com/entry/2014/06/10/152035/Applicationsフォルダの権限設定がおかしいらしい ls -l / total 93 drwxr-xr-x+ 301 20821 wheel 10234 11 24 14:04 Applications drwxrwxr-x@ 11 root wheel 374 7 25 2014 Developer…

PIC Kit 2でdsPIC32F2012に書き込み

ここを参考に http://www.eleki-jack.com/mycom2/2011/07/post_15.htmlICSPコネクタのピン配置 1番ピン /MCLR/Vpp VPPラインに接続、またリセット(MCLR)にも使用 2番ピン VDD 電源ラインに接続し、マイコンに電源を供給 3番ピン Vss GNDラインに接続 4番ピ…

Raspi2のGPIOレジスタのアドレス

http://qiita.com/typo-kun/items/b2b61dd533044ee49b71GPIO Function Selectレジスタのベースアドレスを Raspi B+ : 0x20000000 Raspi 2 : 0x3F000000に変更すればいい(追記)違ってた!!! http://qiita.com/moutend/items/534d597cf5c867273319 Raspi 2…

Raspi 2で自作デバイスドライバが読み込めない

root@raspberrypi:/home/pi/device-driver# insmod ssegled.ko Error: could not insert module ssegled.ko: Device or resource busy root@raspberrypi:/home/pi/device-driver# dmesg | tail [ 162.673488] ssegled loading... [ 162.673520] request_mem_…

Raspiカーネルのクロスコンパイル

ここを参考に https://www.raspberrypi.org/documentation/linux/kernel/building.md

Raspiのカーネルを特定のものにアップデートする

http://tech.enekochan.com/en/2014/03/08/upgradedowngrade-to-a-specific-firmware-kernel-version-with-rpi-update-in-raspbian/ 特定のコミットを指定してrpi-updateをかける sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6 コミットはrpi-f…

Ubuntuのディスクフォーマットがext3かext4か調べる

https://wiki.ubuntulinux.jp/UbuntuTips/Hardware/HowToKnowDeviceFileName $ sudo fdisk -l

MatlabでSimulinkのシミュレート終了を待機する

http://stackoverflow.com/questions/23918278/block-a-matlab-script-while-simulink-runs あんまりいい方法は無くて、get_parmでシミュレーションのステータスを取得するのが現状 set_param(sys,'SimulationCommand','start'); while ~strcmp(get_param(sy…

ホモグラフィー行列で台形ひずみを補正

http://mhr380.hatenablog.com/entry/2014/09/28/214457

ピエゾセンサで振動検知

Fundamentals of Piezoelectric Shock and Vibration Sensors http://www.digikey.com/en/articles/techzone/2011/dec/fundamentals-of-piezoelectric-shock-and-vibration-sensors 簡易的な方法 http://www.robotoid.com/appnotes/sensors-piezo-disc-touch…

SimulinkでArduinoのA/D変換値をリアルタイムキャプチャする

http://www.element14.com/community/thread/32223/l/arduino-uno-serial-comms-to-simulink?displayFullThread=true2つのSimulinkブロック間でシリアル値を渡すらしい 1. Enable External Mode in Simulink. Note: Arduino Uno is not supported for exter…

SimulinkでArduino RoTHを使う

RoTH = Run on Target Hardware手順は 0. Prepare 1. Build(Deploy) 2. Simulate(Run)例(Scopeは不要だがつけてみた) SimulinkとArduinoの連携も最新のやり方は本家を参考にすると良い。 1. Prepare for Run 注意点:明示的にシリアルポートを指定する(/de…

ArduinoとMATLABの連携(MATLAB 2015a)

Target Hardwareのライブラリの追加 $ supportPackageInstallerMATLABおよびSimulinkライブラリを追加する次の書籍を参考にしたが、やり方が異なるので注意。 ちなみにAPIもかなり変わっているので、本家のサイトかヘルプ画面からArduinoチュートリアルを見…

Maximaで部分分数分解と分数の簡単化

http://www.cc.kyoto-su.ac.jp/~mtkg/lecture/comp_A/2014/14.html partfrac(), ratsimp() (%i4) partfrac(x/(x+1), x); 1 (%o4) 1 - ----- x + 1 (%i5) ratsimp(%); x (%o5) ----- x + 1

Javaをインタプリタ的に実行するjavarepl

Javaの文法の確認に使える https://github.com/albertlatacz/java-repl

Railsのモデルで自分自身にアソシエーションを張る

http://stackoverflow.com/questions/5109893/rails-how-do-self-referential-has-many-models-work belongs_to :parent, :class_name => "Folder" has_many :folders, :foreign_key => "parent_id"

matlabのPatchのメモ

計測自動制御エンジニアの過去問

1 アラームマネージメントシステムについて,知るところを述べよ. 2 制御系のコントローラをディジタルコンピュータで実装する場合,どのようなことを考慮して, サンプリング周期(コントロールレート)を決定すべきか. 3 生体信号を計測す…

Androidデバイスのsqliteをダウンロードする

adb shell "run-as com.afri_inc.senri.demo chmod 666 /data/data/com.afri_inc.senri.demo/databases/tsuru.db" adb shell "run-as com.afri_inc.senri.demo cp /data/data/com.afri_inc.senri.demo/databases/tsuru.db /sdcard/" adb shell "run-as com.a…

財務諸表は何を表しているか