Raspberry Pi2 & openFrameworks TIPS

9月 29, 2015   //   by rssfeeder   //   未分類  //  Raspberry Pi2 & openFrameworks TIPS はコメントを受け付けていません

ofxRPiCameraVideoGrabber

Sampleをmakeすると

could not convert ‘ofGLProgrammableRenderer::TYPE’ from ‘const string {aka const std::basic_string<char>}’ to ‘std::shared_ptr<ofBaseRenderer>’ ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);

とでる。

こちらを参考にmain.cppを以下に変更

int main{

ofGLESWindowSettings settings;

settings.width = <span class="hljs-number">1280</span>;

settings.height = <span class="hljs-number">720</span>;

settings.setGLESVersion(<span class="hljs-number">2</span>);

ofCreateWindow(settings);

ofRunApp( <span class="hljs-keyword">new</span> testApp());

}

でmake成功した

makeオプション指定を楽にする

makeする時にいちいち、オプション指定するのが面倒くさいので

cd
ls -a

で表示される

.profile

nano .profile

してnanoでオープンして

export MAKEFLAGS=-j4 PLATFORM_VARIANT=rpi2

と書き込むと

openFrameworksのExampleフォルダ等で

make

するだけで、コンパイルが走る!

GPIOの番号を表示

gpio readall

openFrameworksからgpioを使う場合は、wiringPiを使うようです。GPIOの番号は、Raspberry PiとwiringPiで割当が違うようで番号を調べてる中で、上記のコマンドを見つけました。

接続されているI2Cデバイスを探す

i2cdetect -y 1

addonの追加

addonフォルダにて

git clone 使いたいofxAddonのリポジトリURL

プロジェクトフォルダのaddons.makeにAddon名を記入

ofxAddon

debug

Program received signal SIGILL, Illegal instruction と出て起動時に止まってしまう問題。gdbで以下のコマンドを打つと取り敢えず回避できる。

handle SIGILL nostop
handle SIGINT nonstop

Comments are closed.

Archives