Skip to content

Instantly share code, notes, and snippets.

@tkoki
Last active December 29, 2015 00:53
Show Gist options
  • Save tkoki/52212a28bb1a580cc785 to your computer and use it in GitHub Desktop.
Save tkoki/52212a28bb1a580cc785 to your computer and use it in GitHub Desktop.
Edison上でmraaがちゃんとインストールされているかを確認する
/*
Edison上で
% gcc -lmraa -o mraacheck mraacheck.c
% ./mraacheck
hello mraa
Version: v0.9.0
Running on: Intel Edison
などと表示されればok.
*/
#include "mraa.h"
#include <stdio.h>
int main(int argc, char **argv) {
char *board_name = mraa_get_platform_name();
fprintf(stdout, "hello mraa\n Version: %s\n Running on: %s\n", mraa_get_version(), board_name);
mraa_deinit();
return MRAA_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment