PCL(Point Cloud Library) can use on Android, but don’t supply Android binary. So let’s build PCL using Android NDK on MacOS 10.9.4!! verrrry easy to build.
wget http://dl.google.com/android/ndk/android-ndk-r8c-darwin-x86.tar.bz2
tar -jxvf android-ndk-r8c-darwin-x86.tar.bz2
cd android-ndk-r8c
export ANDROID_NDK=$PWD
cd ~work
git clone https://github.com/hirotakaster/pcl-superbuild.git
cd pcl-superbuild
mkdir build
cd build
cmake ../
make -j4 # j4 is prallel build option
All build finish, you will find following include and library.
pcl-superbuild/build/CMakeExternals/Install/boost-android/
pcl-superbuild/build/CMakeExternals/Install/flann-android/
pcl-superbuild/build/CMakeExternals/Install/pcl-android/
Next build android application(like a Google Project tango) with PCL and NDK library.
LightBlue Bean(Bluetooth Low Energy module, Temperature sensors, accelerometer, LGB LED, Arduino compatible!!)
Luminosity Sensor: L-31ROPT1C
Sound Sensor: MEMS Microphone Breakout – INMP401(ADMP401) Let’s put light blue into the ping pong ball. This ping pong ball changes the color of the LED as the bean accelerates, the around light/sound/temperature. And all sensor values can get through the bean’s Bluetooth(like a environmental sensor).
Arduino Pro Miniを大量に使いたくなった。色々と探してみたけど、どうやっても1個あたり1,000円位はする。もしこれを30個とかなら…えー3万円オーバー!?ってことで、何気に切ない。
という事で、互換ボードでも良いや!!と思って、探してみたら…ありましたよ、アリババさんとこに。あ、正確にはここ
AliExpressという所。まぁ、安けりゃ何でもいいや!!と思いつつ、ポチってやったぜ!!
一応、色んな意味でチャイナさんにカード情報を渡すのも怖いというのも若干あったりするから、Vプリカで使い捨てカードをゲットした。
このAliExpressの面白いのが、物を買う時は一応カードで買う訳だけど、ちゃんと届いて確認するまで(Confirm Order Receivedボタンをポチるまで)、実際のカード決済がされない。
つまり届いて「あんじゃこりゃ!?」だったり、届かなかったりしたらExpipreしてカードから支払いはされないという、買い手に大分厚い保護がある。とは言え、カード情報を登録するのもイヤだったから、Vプリカを使った。
今回買ったのは、こちらの2品
まずは、Arduino Pro Mini 5V互換、10個で$21.24。つまり、1個あたり200円ちょっと(www
そして、不安だったから、こちらも。Arduino Pro Mini 3.3V互換、10個で$29.49。こっちは1個あたり300円ちょっと(www
void setup() {
// initialize serial communication at 57600 bits per second:
Serial.begin(57600);
}
// the loop routine runs over and over again forever:
void loop() {
AccelerationReading accel = {0, 0, 0};
accel = Bean.getAcceleration();
uint16_t r = (abs(accel.xAxis)) / 4;
uint16_t g = (abs(accel.yAxis)) / 4;
uint16_t b = (abs(accel.zAxis)) / 4;
Bean.setLed((uint8_t)r,(uint8_t)g,(uint8_t)b);
Bean.sleep(50);
}