SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
/.
kmd n
-NB PB /. IFDEPB BA M
n Yilf
L E DB PEB F DB
: NLII M
a bc
k t oW
EBNB FO 8F F LNAF N EL B W
a bc
k t oW
EBNB FO 8F F LNAF N EL B W
a
LAA F N EL B
/.
c k
L HB /. OFD DB
2 NAS NB
/. PNFT 8 BI
OM BNN 8F






1 PNFT 2
n
-L B P I AO MB M BIO RBNPF II
w
BF CLN B I H P MB


v su yb k
0FT L LLH OP AO D BP
:LCPS NB




OM F
7: OBP M
git libgraphicsmagick++-dev libwebp-dev
8F 1 /. PNFT
1BP F ! HB
$ 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
.B L
$ cd example-api-use
$ sudo ./demo 

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

-D 0
md
:ELS S M
md n
-LIIB P S M F DBO
b ek
NN DB PEB
: NLII .B L
$ sudo ./demo 

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

-D 1 ../../images/wapuu.ppm
:BIB P 8
8 8
8 8
-NB PB 8
- OPL / A 8LF P
/wp-json/wapuu/v1/set/nnn
/wp-json/wapuu/v1/get
p y o x
AA B A MLF P
add_action( 'rest_api_init', function () {
register_rest_route( 'wapuu/v1', '/set/(?P<id>d+)', array(
'methods' => 'POST',
'callback' => 'set_wapuu_image',
'args' => array(
'id' => array(
'validate_callback' => function($param, $request, $key) {
return is_numeric( $param );
}
),
),
) );
register_rest_route( 'wapuu/v1', '/get', array(
'methods' => 'GET',
'callback' => 'get_wapuu_image',
) );
} );
n
:BP 1BP DB BN
function set_wapuu_image( $data ) {
$id = $data['id'];
update_post_meta( 60, 'wapuu-image', $id );
$data = array( 'id' => $id );
return new WP_REST_Response( $data, 200 );
}
function get_wapuu_image() {
$id = get_post_meta( 60, 'wapuu-image');
$data = array( 'id' => $id );
return new WP_REST_Response( $data, 200 );
}
8 BOML OB
http://example.net/wp-json/
wapuu/v1/get
{"id":"001"}
8 PEL LAB
L O8F
8 hj
1BP F DB BN CNL 8
api="http://example.net/wp-json/wapuu/v1/get"
def img_number():
try:
html = urllib.urlopen( api ).read()
except:
return None
data = json.loads(html)
return data['id']
n
BPNFBRB F DB CNL BN
image_dir = "~/wapuu/"
viewer = "~/rpi-rgb-led-matrix/utils/led-image-viewer"
opt = " --led-daemon --led-gpio-mapping=adafruit-hat" +
" --led-no-hardware-pulse --led-chain=4 -L"
prev = None
while True:
time.sleep(2)
number = img_number()
if number is None: continue
files = glob.glob(image_dir+number+"-*.png")
if len(files) < 1: continue
if files[0] == prev: continue
if prev is not None: kill_img()
commands.getstatusoutput("sudo "+viewer+opt+files[0])
prev = files[0]
j Y c n
/N OB MNBRFL O F DB
pattern = r"^ *(d+) .*/led-image-viewer"
def kill_img ():
id = []
ps_list = commands.getoutput('ps awx')
for process in ps_list.split("n"):
match = re.match(pattern, process)
if not match: continue
id.append(match.group(1))
commands.getoutput("sudo kill "+" ".join(id))
r
:BIB PLN 8 DB
<form method="post"
action="/wp-json/wapuu/v1/set/001">
<div>[caption id="attachment_40"
align="alignleft" width="150"]
<img src="/wp-content/uploads/
2017/09/001-original-150x150.png"
alt="001" width="150" height="150"
class="size-thumbnail wp-image-40" />
Original (WordCamp 2011 Fukuoka)<br>
<button type="submit" value="001">

Submit</button>
[/caption]</div></form>
7.7




LNA0BO g
.FOMI P LNA0BO F DL
& &
http://www.yuriko.net/
@lilyfanjp
EPPMO SSS OIFABOE NB BP
IFI C IBA PNFT S M
EPPMO DFPE L IFI C GM
S M IBA

Más contenido relacionado

La actualidad más candente

Tilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncherTilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncherTatsuhiko Miyagawa
 
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"GeeksLab Odessa
 
GHCソースコード読みのススメ
GHCソースコード読みのススメGHCソースコード読みのススメ
GHCソースコード読みのススメKiwamu Okabe
 
LINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tipsLINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tipsLINE Corporation
 
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 -  Les PSRMeet up symfony 16 juin 2017 -  Les PSR
Meet up symfony 16 juin 2017 - Les PSRJulien Vinber
 
Perl6 operators and metaoperators
Perl6   operators and metaoperatorsPerl6   operators and metaoperators
Perl6 operators and metaoperatorsSimon Proctor
 
Exploring slides
Exploring slidesExploring slides
Exploring slidesakaptur
 
Shell Script to Extract IP Address, MAC Address Information
Shell Script to Extract IP Address, MAC Address InformationShell Script to Extract IP Address, MAC Address Information
Shell Script to Extract IP Address, MAC Address InformationVCP Muthukrishna
 
JIP Pipeline System Introduction
JIP Pipeline System IntroductionJIP Pipeline System Introduction
JIP Pipeline System Introductionthasso23
 
The Art of Command Line (2021)
The Art of Command Line (2021)The Art of Command Line (2021)
The Art of Command Line (2021)Kenta Yamamoto
 
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみたR版Getopt::Longを作ってみた
R版Getopt::Longを作ってみたTakeshi Arabiki
 
Nest v. Flat with EmberData
Nest v. Flat with EmberDataNest v. Flat with EmberData
Nest v. Flat with EmberDataRyan M Harrison
 
第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディングnobu_k
 
G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~Tsuyoshi Yamamoto
 
Javascript Continues Integration in Jenkins with AngularJS
Javascript Continues Integration in Jenkins with AngularJSJavascript Continues Integration in Jenkins with AngularJS
Javascript Continues Integration in Jenkins with AngularJSLadislav Prskavec
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHPNat Weerawan
 
Hacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & ProfitHacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & ProfitRuben van Vreeland
 
Sequential Async Call
Sequential Async CallSequential Async Call
Sequential Async CallSirius Fang
 

La actualidad más candente (20)

Tilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncherTilting Google Maps and MissileLauncher
Tilting Google Maps and MissileLauncher
 
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
 
GHCソースコード読みのススメ
GHCソースコード読みのススメGHCソースコード読みのススメ
GHCソースコード読みのススメ
 
LINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tipsLINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tips
 
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 -  Les PSRMeet up symfony 16 juin 2017 -  Les PSR
Meet up symfony 16 juin 2017 - Les PSR
 
Perl6 operators and metaoperators
Perl6   operators and metaoperatorsPerl6   operators and metaoperators
Perl6 operators and metaoperators
 
Exploring slides
Exploring slidesExploring slides
Exploring slides
 
Shell Script to Extract IP Address, MAC Address Information
Shell Script to Extract IP Address, MAC Address InformationShell Script to Extract IP Address, MAC Address Information
Shell Script to Extract IP Address, MAC Address Information
 
JIP Pipeline System Introduction
JIP Pipeline System IntroductionJIP Pipeline System Introduction
JIP Pipeline System Introduction
 
The Art of Command Line (2021)
The Art of Command Line (2021)The Art of Command Line (2021)
The Art of Command Line (2021)
 
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみたR版Getopt::Longを作ってみた
R版Getopt::Longを作ってみた
 
Nest v. Flat with EmberData
Nest v. Flat with EmberDataNest v. Flat with EmberData
Nest v. Flat with EmberData
 
G* on GAE/J 挑戦編
G* on GAE/J 挑戦編G* on GAE/J 挑戦編
G* on GAE/J 挑戦編
 
第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング第一回MongoDBソースコードリーディング
第一回MongoDBソースコードリーディング
 
Spark Jobserver
Spark JobserverSpark Jobserver
Spark Jobserver
 
G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~
 
Javascript Continues Integration in Jenkins with AngularJS
Javascript Continues Integration in Jenkins with AngularJSJavascript Continues Integration in Jenkins with AngularJS
Javascript Continues Integration in Jenkins with AngularJS
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
 
Hacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & ProfitHacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & Profit
 
Sequential Async Call
Sequential Async CallSequential Async Call
Sequential Async Call
 

Destacado

世界No.1 CMS WordPressへのいざない
世界No.1 CMS WordPressへのいざない世界No.1 CMS WordPressへのいざない
世界No.1 CMS WordPressへのいざないYuriko IKEDA
 
Json時刻表とは
Json時刻表とはJson時刻表とは
Json時刻表とはYuriko IKEDA
 
LEDマトリックスで光るわぷー(WordPressで指定編その1)
LEDマトリックスで光るわぷー(WordPressで指定編その1)LEDマトリックスで光るわぷー(WordPressで指定編その1)
LEDマトリックスで光るわぷー(WordPressで指定編その1)Yuriko IKEDA
 
WordPressで制御するこれからのIoT
WordPressで制御するこれからのIoTWordPressで制御するこれからのIoT
WordPressで制御するこれからのIoTYuriko IKEDA
 
コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]
コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]
コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]digitalitalentity
 
常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo
常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo
常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyoMasayuki Maekawa
 
20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話
20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話
20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話Noriaki Takahashi
 
ECサイトをWooCommerceで始めよう
ECサイトをWooCommerceで始めようECサイトをWooCommerceで始めよう
ECサイトをWooCommerceで始めようAtsufumi Yoshikawa
 
大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計
大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計
大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計loftwork
 
WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」
WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」
WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」Hijili Kosugi
 
WordPressをこれから始める人のためのテーマ講座
WordPressをこれから始める人のためのテーマ講座WordPressをこれから始める人のためのテーマ講座
WordPressをこれから始める人のためのテーマ講座Takami Kazuya
 
安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)
安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)
安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)JPCERT Coordination Center
 
WordCamp Tokyo 2017 へようこそ
WordCamp Tokyo 2017 へようこそWordCamp Tokyo 2017 へようこそ
WordCamp Tokyo 2017 へようこそMignon Style
 
なぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Ver
なぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Verなぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Ver
なぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017VerMasatoshi Someya
 
利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス
利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス
利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセスHiroyuki Ishikawa
 
Think Before You Submit Themes on WordPress dot Org
Think Before You Submit Themes on WordPress dot OrgThink Before You Submit Themes on WordPress dot Org
Think Before You Submit Themes on WordPress dot OrgKafle G
 
これだけは知っておきたい「Webアクセシビリティ」のこと
これだけは知っておきたい「Webアクセシビリティ」のことこれだけは知っておきたい「Webアクセシビリティ」のこと
これだけは知っておきたい「Webアクセシビリティ」のことMakoto Ueki
 

Destacado (17)

世界No.1 CMS WordPressへのいざない
世界No.1 CMS WordPressへのいざない世界No.1 CMS WordPressへのいざない
世界No.1 CMS WordPressへのいざない
 
Json時刻表とは
Json時刻表とはJson時刻表とは
Json時刻表とは
 
LEDマトリックスで光るわぷー(WordPressで指定編その1)
LEDマトリックスで光るわぷー(WordPressで指定編その1)LEDマトリックスで光るわぷー(WordPressで指定編その1)
LEDマトリックスで光るわぷー(WordPressで指定編その1)
 
WordPressで制御するこれからのIoT
WordPressで制御するこれからのIoTWordPressで制御するこれからのIoT
WordPressで制御するこれからのIoT
 
コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]
コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]
コンテンツ戦国時代をどう生き抜く?成果につながるコンテンツマーケティングの基本[SEO][オウンドメディア]
 
常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo
常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo
常時SSL化の事前確認・注意点・手順 〜WordPressとその周辺で必要なこと〜 #wctokyo
 
20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話
20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話
20170916ブログを強力な武器としてビジネスにインストールすることで独立を成功させた話
 
ECサイトをWooCommerceで始めよう
ECサイトをWooCommerceで始めようECサイトをWooCommerceで始めよう
ECサイトをWooCommerceで始めよう
 
大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計
大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計
大規模案件の苦悩から生まれた
柔軟なカスタムフィールド設計
 
WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」
WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」
WordCamp Tokyo 2017 ランチセッション「WordPress を使い始めたら 感謝を伝えよう」
 
WordPressをこれから始める人のためのテーマ講座
WordPressをこれから始める人のためのテーマ講座WordPressをこれから始める人のためのテーマ講座
WordPressをこれから始める人のためのテーマ講座
 
安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)
安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)
安全なプラグインに必要なこと: 脆弱性届出状況に見る傾向と対策 (WordCampTokyo 2017)
 
WordCamp Tokyo 2017 へようこそ
WordCamp Tokyo 2017 へようこそWordCamp Tokyo 2017 へようこそ
WordCamp Tokyo 2017 へようこそ
 
なぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Ver
なぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Verなぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Ver
なぜ人は怪しい壺を欲しくなってしまうのか WordCamp Tokyo 2017Ver
 
利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス
利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス
利用者数倍増! 観光協会サイト「ツアーガイドひかり」を引き継ぎ、活性化するまでの技術とプロセス
 
Think Before You Submit Themes on WordPress dot Org
Think Before You Submit Themes on WordPress dot OrgThink Before You Submit Themes on WordPress dot Org
Think Before You Submit Themes on WordPress dot Org
 
これだけは知っておきたい「Webアクセシビリティ」のこと
これだけは知っておきたい「Webアクセシビリティ」のことこれだけは知っておきたい「Webアクセシビリティ」のこと
これだけは知っておきたい「Webアクセシビリティ」のこと
 

Similar a Create LED lightened Wapuu (LEDパネルで光るわぷーを)

Talkaboutlithium
TalkaboutlithiumTalkaboutlithium
Talkaboutlithiumnoppoman722
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-pythonEric Ahn
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-pythonEric Ahn
 
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Masahiro Nagano
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stackEric Ahn
 
WordPressでIoTをはじめよう
WordPressでIoTをはじめようWordPressでIoTをはじめよう
WordPressでIoTをはじめようYuriko IKEDA
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
WordPress Advanced Custom Fields - 101
WordPress  Advanced Custom Fields - 101WordPress  Advanced Custom Fields - 101
WordPress Advanced Custom Fields - 101Leo Caseiro
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges✅ William Pinaud
 
WIRED and the WP REST API
WIRED and the WP REST APIWIRED and the WP REST API
WIRED and the WP REST APIkvignos
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworksdiego_k
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
Socket applications
Socket applicationsSocket applications
Socket applicationsJoão Moura
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlKent Cowgill
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutVic Metcalfe
 

Similar a Create LED lightened Wapuu (LEDパネルで光るわぷーを) (20)

Talkaboutlithium
TalkaboutlithiumTalkaboutlithium
Talkaboutlithium
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
 
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
WordPressでIoTをはじめよう
WordPressでIoTをはじめようWordPressでIoTをはじめよう
WordPressでIoTをはじめよう
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
WordPress Advanced Custom Fields - 101
WordPress  Advanced Custom Fields - 101WordPress  Advanced Custom Fields - 101
WordPress Advanced Custom Fields - 101
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
 
WIRED and the WP REST API
WIRED and the WP REST APIWIRED and the WP REST API
WIRED and the WP REST API
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
Django
DjangoDjango
Django
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
php ali.docx
php ali.docxphp ali.docx
php ali.docx
 
What's New in ZF 1.10
What's New in ZF 1.10What's New in ZF 1.10
What's New in ZF 1.10
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with Perl
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and Knockout
 

Más de Yuriko IKEDA

デフォルト誕生日を知らべてみた
デフォルト誕生日を知らべてみたデフォルト誕生日を知らべてみた
デフォルト誕生日を知らべてみたYuriko IKEDA
 
WordCamp 5.3 & Community
WordCamp 5.3 & CommunityWordCamp 5.3 & Community
WordCamp 5.3 & CommunityYuriko IKEDA
 
Photography staff at WordCamp Tokyo 2019
Photography staff at WordCamp Tokyo 2019Photography staff at WordCamp Tokyo 2019
Photography staff at WordCamp Tokyo 2019Yuriko IKEDA
 
端末開発のススメ
端末開発のススメ端末開発のススメ
端末開発のススメ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 ShinjukuYuriko 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 yearsYuriko 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-20170805Yuriko IKEDA
 
架空鉄道紹介誌の制作
架空鉄道紹介誌の制作架空鉄道紹介誌の制作
架空鉄道紹介誌の制作Yuriko IKEDA
 
武器屋の開き方
武器屋の開き方武器屋の開き方
武器屋の開き方Yuriko IKEDA
 
JSON時刻表その後
JSON時刻表その後JSON時刻表その後
JSON時刻表その後Yuriko IKEDA
 
WordFesの翌日はタワーに登りましょう
WordFesの翌日はタワーに登りましょうWordFesの翌日はタワーに登りましょう
WordFesの翌日はタワーに登りましょうYuriko IKEDA
 

Más de Yuriko IKEDA (20)

デフォルト誕生日を知らべてみた
デフォルト誕生日を知らべてみたデフォルト誕生日を知らべてみた
デフォルト誕生日を知らべてみた
 
Settaya
SettayaSettaya
Settaya
 
WordCamp 5.3 & Community
WordCamp 5.3 & CommunityWordCamp 5.3 & Community
WordCamp 5.3 & Community
 
Photography staff at WordCamp Tokyo 2019
Photography staff at WordCamp Tokyo 2019Photography staff at WordCamp Tokyo 2019
Photography staff at WordCamp Tokyo 2019
 
端末開発のススメ
端末開発のススメ端末開発のススメ
端末開発のススメ
 
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の翌日はタワーに登りましょう
 

Último

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Último (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Create LED lightened Wapuu (LEDパネルで光るわぷーを)

  • 1. /. kmd n -NB PB /. IFDEPB BA M
  • 2. n Yilf L E DB PEB F DB
  • 4. a bc k t oW EBNB FO 8F F LNAF N EL B W
  • 5. a bc k t oW EBNB FO 8F F LNAF N EL B W a LAA F N EL B
  • 6. /. c k L HB /. OFD DB
  • 11. n -L B P I AO MB M BIO RBNPF II
  • 12. w BF CLN B I H P MB 

  • 13. v su yb k 0FT L LLH OP AO D BP
  • 15. OM F
  • 16. 7: OBP M git libgraphicsmagick++-dev libwebp-dev
  • 17. 8F 1 /. PNFT
  • 18. 1BP F ! HB $ 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
  • 19. .B L $ cd example-api-use $ sudo ./demo 
 --led-gpio-mapping=adafruit-hat --led-no-hardware-pulse --led-chain=4 -L 
 -D 0
  • 21. md n -LIIB P S M F DBO
  • 22. b ek NN DB PEB
  • 23. : NLII .B L $ sudo ./demo 
 --led-gpio-mapping=adafruit-hat --led-no-hardware-pulse --led-chain=4 -L 
 -D 1 ../../images/wapuu.ppm
  • 25. 8 8
  • 27. - OPL / A 8LF P /wp-json/wapuu/v1/set/nnn /wp-json/wapuu/v1/get
  • 28. p y o x AA B A MLF P add_action( 'rest_api_init', function () { register_rest_route( 'wapuu/v1', '/set/(?P<id>d+)', array( 'methods' => 'POST', 'callback' => 'set_wapuu_image', 'args' => array( 'id' => array( 'validate_callback' => function($param, $request, $key) { return is_numeric( $param ); } ), ), ) ); register_rest_route( 'wapuu/v1', '/get', array( 'methods' => 'GET', 'callback' => 'get_wapuu_image', ) ); } );
  • 29. n :BP 1BP DB BN function set_wapuu_image( $data ) { $id = $data['id']; update_post_meta( 60, 'wapuu-image', $id ); $data = array( 'id' => $id ); return new WP_REST_Response( $data, 200 ); } function get_wapuu_image() { $id = get_post_meta( 60, 'wapuu-image'); $data = array( 'id' => $id ); return new WP_REST_Response( $data, 200 ); }
  • 31. 8 PEL LAB L O8F
  • 32. 8 hj 1BP F DB BN CNL 8 api="http://example.net/wp-json/wapuu/v1/get" def img_number(): try: html = urllib.urlopen( api ).read() except: return None data = json.loads(html) return data['id']
  • 33. n BPNFBRB F DB CNL BN image_dir = "~/wapuu/" viewer = "~/rpi-rgb-led-matrix/utils/led-image-viewer" opt = " --led-daemon --led-gpio-mapping=adafruit-hat" + " --led-no-hardware-pulse --led-chain=4 -L" prev = None while True: time.sleep(2) number = img_number() if number is None: continue files = glob.glob(image_dir+number+"-*.png") if len(files) < 1: continue if files[0] == prev: continue if prev is not None: kill_img() commands.getstatusoutput("sudo "+viewer+opt+files[0]) prev = files[0]
  • 34. j Y c n /N OB MNBRFL O F DB pattern = r"^ *(d+) .*/led-image-viewer" def kill_img (): id = [] ps_list = commands.getoutput('ps awx') for process in ps_list.split("n"): match = re.match(pattern, process) if not match: continue id.append(match.group(1)) commands.getoutput("sudo kill "+" ".join(id))
  • 35. r :BIB PLN 8 DB <form method="post" action="/wp-json/wapuu/v1/set/001"> <div>[caption id="attachment_40" align="alignleft" width="150"] <img src="/wp-content/uploads/ 2017/09/001-original-150x150.png" alt="001" width="150" height="150" class="size-thumbnail wp-image-40" /> Original (WordCamp 2011 Fukuoka)<br> <button type="submit" value="001">
 Submit</button> [/caption]</div></form>
  • 36.
  • 38. LNA0BO g .FOMI P LNA0BO F DL & &
  • 39. http://www.yuriko.net/ @lilyfanjp EPPMO SSS OIFABOE NB BP IFI C IBA PNFT S M EPPMO DFPE L IFI C GM S M IBA