0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

NFCネイルチップをLチカしてみた

Last updated at Posted at 2021-03-29

はじめに

NFCに反応するLEDネイルチップをLチカしてみた。

IMG_7398.jpg

環境

  • Raspberry Pi 3 Model B+
  • 非接触ICカードリーダ/ライタ (RC-S310)
  • NFCネイルチップ

手順

1. libpafeをダウンロードする

$ wget http://hito.music.coocan.jp/pasori/libpafe-0.0.8.tar.gz

2. libpafeをビルドする

$ sudo apt install libusb-1.0-0-dev
$ tar xvzf libpafe-0.0.8.tar.gz
$ cd libpafe-0.0.8/
$ ./configure
$ make

3. libpafeをインストールする

$ sudo make install
$ sudo vi /lib/udev/rules.d/60-libpafe.rules
60-libpafe.rules
ACTION!="add", GOTO="pasori_rules_end"
SUBSYSTEM=="usb_device", GOTO="pasori_rules_start"
SUBSYSTEM!="usb", GOTO="pasori_rules_end"
LABEL="pasori_rules_start"

ATTRS{idVendor}=="054c", ATTRS{idProduct}=="006c", MODE="0664", GROUP="plugdev"
ATTRS{idVendor}=="054c", ATTRS{idProduct}=="01bb", MODE="0664", GROUP="plugdev"
ATTRS{idVendor}=="054c", ATTRS{idProduct}=="02e1", MODE="0664", GROUP="plugdev"

LABEL="pasori_rules_end"
$ sudo ln -s /lib/udev/rules.d/60-libpafe.rules /etc/udev/rules.d/
$ sudo udevadm control --reload-rules
$ sudo reboot

4. libpafe-rubyをダウンロードする

$ wget http://hito.music.coocan.jp/pasori/libpafe-ruby-0.0.8.tar.gz

5. libpafe-rubyをビルドする

$ sudo apt-get install ruby ruby2.5-dev
$ tar xvzf libpafe-ruby-0.0.8.tar.gz 
$ cd libpafe-ruby/
$ ruby extconf.rb
$ make

6. libpafe-rubyをインストールする

$ sudo make install

7. サンプルプログラムを実行する

$ ruby sample/felica_dump.rb
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?