SlideShare a Scribd company logo
LEDパネルで
光るわぷーを
Create LED lightened Wapuu
自己紹介
Self Introduce
‣
‣


http://www.yuriko.net/
@lilyfanjp
架空鉄道の同人誌は売れない
Sales of imaginary railway books are very small.
LED方向幕を展示
Displayed LED rollsign
ラズパイで制御
Controlled by Raspberry Pi
Raspberry Pi +
RGB Matrix HAT
Switching PSU
Power Tap
“一般的なご家庭には
必ずあるラズパイ”
“At least one RPi in a ordinary home ”
逸般的な誤家庭
none-ordinary & odd home
LED方向幕は
自作できる
You can make a LED rollsign
Hardware
LED Matrix Panel
Signal (in) Next to
Raspberry Pi






Pin Header (to HAT)
HDMI
4x
USB
RGB Matrix HAT
To LED Panel
横長パネルを縦接続
Connect landscape panels vertically
黒テープで補強
Reinforce by black tape
表から見て

面が うこと
Faces are uniformed.
ブックスタンドに貼る
Fix on book stands by magnet
背面の磁石
Magnets on Panel back
Attention!


Software




Raspbian
RPi RGB LED Matrix
OS set up
git libgraphicsmagick++-dev libwebp-dev
Get Lib & Make
$ git clone https://github.com/hzeller/rpi-rgb-led-matrix
$ cd rpi-rgb-led-matrix
$ make -C examples-api-use
$ cd utils
$ make led-image-viewer
Demo
$ cd example-api-use
$ sudo ./demo 

--led-gpio-mapping=adafruit-hat 
--led-no-hardware-pulse 
--led-chain=4 -L 

-D 0
わぷー表示
Show wapuu
Create DATA


わぷー画像を収集
Collect wapuu images
横に並べる
Arrange them
Scroll images
$ sudo ./demo
--led-gpio-mapping=adafruit-hat 
--led-no-hardware-pulse 
--led-chain=4 -L
-D 1 ../../images/wapuu.ppm
Demo
Auto Run
$ crontab -e
@reboot /home/pi/startup.sh
HAT Detection
#!/bin/sh
prod_path="/proc/device-tree/hat/product"
if test -f $prod_path; then
product=$(cat $prod_path)
case $product in
"Adafruit RGB Matrix + RTC HAT - HUB75 / DS1307") ./wapuu.sh;;
Run scroll demo
sudo ./demo 
--led-gpio-mapping=adafruit-hat 
--led-no-hardware-pulse
--led-chain=4 -L 
-D 1 ../../images/wapuu.ppm
表示の止め方
How to stop
$ ssh pi@led.local
ps auwx
sudo kill NNNN
ワンライナー
one liner script
Select by API
WP API で表示変更
http://wp.yuriko.net

/wp-json/wp/v2/pages/60
Response
{"id":60,"date":"2017-09-02T13:45:54",
"date_gmt":"2017-09-02T04:45:54",
"guid":{"rendered":"http://wp.yuriko.net/?page_id=60"},
"modified":"2017-09-02T15:12:12",
"modified_gmt":"2017-09-02T06:12:12",
"slug":"selected",
"status":"publish",
"type":"page",
"link":"http://wp.yuriko.net/selected/",
"title":{"rendered":"Selected"},
"content":{"rendered":"<p>001</p>n","protected":false},
"excerpt":{"rendered":"<p>001</p>n","protected":false},
"author":1,
"featured_media":0,
"parent":0,
"menu_order":0,
"comment_status":"closed",
"ping_status":"closed",
"template":"",
"meta":[],
"_links":{
"self":[{"href":"http://wp.yuriko.net/wp-json/wp/v2/pages/60"}],
"collection":[{"href":"http://wp.yuriko.net/wp-json/wp/v2/pages"}],
"about":[{"href":"http://wp.yuriko.net/wp-json/wp/v2/types/page"}],
"author":[{"embeddable":true,"href":"http://wp.yuriko.net/wp-json/wp/v2/users/
1"}],
"replies":[{"embeddable":true,"href":"http://wp.yuriko.net/wp-json/wp/v2/
comments?post=60"}],
"version-history":[{"href":"http://wp.yuriko.net/wp-json/wp/v2/pages/60/
revisions"}],
"wp:attachment":[{"href":"http://wp.yuriko.net/wp-json/wp/v2/media?parent=60"}],
"curies":[{"name":"wp","href":"https://api.w.org/{rel}","templated":true}]
}}
"content":{
"rendered":"<p>001</p>n",
"protected":false
},
画像番号の取得
#/usr/bin/python
import urllib
import json
import re
import glob
import commands
import time
api = "http://wp.yuriko.net/wp-json/wp/v2/pages/60"
image_dir = "/home/lily/led/images/wapuu/"
viewer = "/home/lily/led/rpi-rgb-led-matrix/utils/
led-image-viewer "
opt = "--led-no-hardware-pulse --led-chain=4" 
+ "-L --led-brightness=50 -f "
APIアクセス
while True:
result = None
try:
result = urllib.urlopen( api ).read()
except ValueError:
print "API Access Failed."
data = json.loads( result )
content = data["content"]["rendered"]
matchOB = re.match( r'<p>(.*)</p>', content)
if not matchOB:
continue
番号抽出して画像表示
number = matchOB.group(1)
files = glob.glob( 
image_dir + number + "-*.png" )
if len(files) < 1:
continue
commands.getoutput( 
"sudo "+viewer+opt+files[0] )
TODO
WordCamp Tokyo 2017
のLTに登壇
Speech at WordCamp Tokyo 2017 LT
2017-09-16

More Related Content

More from Yuriko IKEDA

端末開発のススメ
端末開発のススメ端末開発のススメ
端末開発のススメ
Yuriko IKEDA
 
WordPressでIoTをはじめよう
WordPressでIoTをはじめようWordPressでIoTをはじめよう
WordPressでIoTをはじめよう
Yuriko IKEDA
 
Local 10 周年パーティーに行ってきた話
Local 10 周年パーティーに行ってきた話Local 10 周年パーティーに行ってきた話
Local 10 周年パーティーに行ってきた話
Yuriko IKEDA
 
Fastest routes from Meisei-univ to Shinjuku
Fastest routes from Meisei-univ to ShinjukuFastest routes from Meisei-univ to Shinjuku
Fastest routes from Meisei-univ to Shinjuku
Yuriko IKEDA
 
Faster route from Shinjuku to Meisei univ.
Faster route from Shinjuku to Meisei univ.Faster route from Shinjuku to Meisei univ.
Faster route from Shinjuku to Meisei univ.
Yuriko IKEDA
 
Introduce raspberry pi's 7 years
Introduce raspberry pi's 7 yearsIntroduce raspberry pi's 7 years
Introduce raspberry pi's 7 years
Yuriko IKEDA
 
WordPress 次期バージョンと日本のコミュニティ
WordPress 次期バージョンと日本のコミュニティWordPress 次期バージョンと日本のコミュニティ
WordPress 次期バージョンと日本のコミュニティ
Yuriko IKEDA
 
カルト宗教の始め方
カルト宗教の始め方カルト宗教の始め方
カルト宗教の始め方
Yuriko IKEDA
 
WordCamp Osaka の熱気を可視化してみた
WordCamp Osaka の熱気を可視化してみたWordCamp Osaka の熱気を可視化してみた
WordCamp Osaka の熱気を可視化してみた
Yuriko IKEDA
 
Scroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォントScroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォント
Yuriko IKEDA
 
Raspi intro-20170805
Raspi intro-20170805Raspi intro-20170805
Raspi intro-20170805
Yuriko IKEDA
 
raspi-led-matrix
raspi-led-matrixraspi-led-matrix
raspi-led-matrix
Yuriko IKEDA
 
架空鉄道紹介誌の制作
架空鉄道紹介誌の制作架空鉄道紹介誌の制作
架空鉄道紹介誌の制作
Yuriko IKEDA
 
武器屋の開き方
武器屋の開き方武器屋の開き方
武器屋の開き方
Yuriko IKEDA
 
100% GPL
100% GPL100% GPL
100% GPL
Yuriko IKEDA
 
JSON時刻表その後
JSON時刻表その後JSON時刻表その後
JSON時刻表その後
Yuriko IKEDA
 
WordFesの翌日はタワーに登りましょう
WordFesの翌日はタワーに登りましょうWordFesの翌日はタワーに登りましょう
WordFesの翌日はタワーに登りましょう
Yuriko IKEDA
 
組長サイトの作り方
組長サイトの作り方組長サイトの作り方
組長サイトの作り方
Yuriko IKEDA
 
Json 時刻表
Json 時刻表Json 時刻表
Json 時刻表
Yuriko IKEDA
 
OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」
OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」
OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」
Yuriko IKEDA
 

More from Yuriko IKEDA (20)

端末開発のススメ
端末開発のススメ端末開発のススメ
端末開発のススメ
 
WordPressでIoTをはじめよう
WordPressでIoTをはじめようWordPressでIoTをはじめよう
WordPressでIoTをはじめよう
 
Local 10 周年パーティーに行ってきた話
Local 10 周年パーティーに行ってきた話Local 10 周年パーティーに行ってきた話
Local 10 周年パーティーに行ってきた話
 
Fastest routes from Meisei-univ to Shinjuku
Fastest routes from Meisei-univ to ShinjukuFastest routes from Meisei-univ to Shinjuku
Fastest routes from Meisei-univ to Shinjuku
 
Faster route from Shinjuku to Meisei univ.
Faster route from Shinjuku to Meisei univ.Faster route from Shinjuku to Meisei univ.
Faster route from Shinjuku to Meisei univ.
 
Introduce raspberry pi's 7 years
Introduce raspberry pi's 7 yearsIntroduce raspberry pi's 7 years
Introduce raspberry pi's 7 years
 
WordPress 次期バージョンと日本のコミュニティ
WordPress 次期バージョンと日本のコミュニティWordPress 次期バージョンと日本のコミュニティ
WordPress 次期バージョンと日本のコミュニティ
 
カルト宗教の始め方
カルト宗教の始め方カルト宗教の始め方
カルト宗教の始め方
 
WordCamp Osaka の熱気を可視化してみた
WordCamp Osaka の熱気を可視化してみたWordCamp Osaka の熱気を可視化してみた
WordCamp Osaka の熱気を可視化してみた
 
Scroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォントScroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォント
 
Raspi intro-20170805
Raspi intro-20170805Raspi intro-20170805
Raspi intro-20170805
 
raspi-led-matrix
raspi-led-matrixraspi-led-matrix
raspi-led-matrix
 
架空鉄道紹介誌の制作
架空鉄道紹介誌の制作架空鉄道紹介誌の制作
架空鉄道紹介誌の制作
 
武器屋の開き方
武器屋の開き方武器屋の開き方
武器屋の開き方
 
100% GPL
100% GPL100% GPL
100% GPL
 
JSON時刻表その後
JSON時刻表その後JSON時刻表その後
JSON時刻表その後
 
WordFesの翌日はタワーに登りましょう
WordFesの翌日はタワーに登りましょうWordFesの翌日はタワーに登りましょう
WordFesの翌日はタワーに登りましょう
 
組長サイトの作り方
組長サイトの作り方組長サイトの作り方
組長サイトの作り方
 
Json 時刻表
Json 時刻表Json 時刻表
Json 時刻表
 
OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」
OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」
OSC2013京都スライド「超小型ARMコンピュータRaspberry Piでできること」
 

Recently uploaded

The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 

Recently uploaded (20)

The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 

LEDマトリックスで光るわぷー(WordPressで指定編その1)