2012-11-08から1日間の記事一覧

秋月のH8/3069FにuCLinuxをインストール(前編)

uCLinuxはマイクロシーリナックスと読むらしい。 (マイクロシー=マイクロコントローラ)ここを参考に。 http://monoist.atmarkit.co.jp/mn/articles/0809/29/news123.htmlまずh8toolsとuClinux-dist-sbcrbook をインストールh8toolsは解凍してパスを通す。…

Raspberry pi をArduinoみたいに使う

http://log.liminastudio.com/writing/tutorials/tutorial-how-to-use-your-raspberry-pi-like-an-arduino wiringPiというのをインストールすると、 Arduinoみたいに使えることがわかった。 (pinModeとかdigitalWrite()とかが使える。)wiringPiのインストー…

PythonでSWIGを使う (進行中)

http://d.hatena.ne.jp/sleepy_yoshi/20091123/p1 にそってやってみる。 # ls fagefage fagefage.c hoge.i hoge.py hoge_wrap.c # cc -o fagefage fagefage.c # cc -o hoge_wrap hoge_wrap.c とすると、 hoge_wrap.c:125:20: fatal error: Python.h: No such…

swigを使ってCのライブラリをRubyから呼び出す

Raspberry pi (OS: Raspbian - wheezy) でSWIGのテスト。こんなCファイルを作成。 hoge.c(名前は適当でいい) void hoge(int num){ printf("Hello, hoge!\n"); } int main() { hoge(0); } インターフェースファイル(っていうのかな?)を作る。 (初期化しない…

Raspberry piのレジスタを直接たたいてI/O制御 with C言語

gpio_c.c #define BCM2708_PERI_BASE 0x20000000 #define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) #include <stdio.h> #include <string.h> #include <stdlib.h> #include <dirent.h> #include <fcntl.h> #include <assert.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> …</unistd.h></sys/stat.h></sys/types.h></sys/mman.h></assert.h></fcntl.h></dirent.h></stdlib.h></string.h></stdio.h>

英辞郎をMountain lionのDictionary.appで使う

ここの記事を参考に。 http://rakkyoo.net/?p=828(1)Infopotで英辞郎のデータを購入 ダウンロード (2)Dictionary development kitをApp dev centerからダウンロード https://sites.google.com/site/casualconcj/yutiriti-puroguramu/userdictionary_ma…