Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
サーマルプリンタとRaspberry Piでカンバンを改善した話
Search
Yuya Kato
February 22, 2019
Programming
3
1.3k
サーマルプリンタとRaspberry Piでカンバンを改善した話
Yuya Kato
February 22, 2019
Tweet
Share
More Decks by Yuya Kato
See All by Yuya Kato
技術書典7で見つけたベアメタルRust本 / Bare Metal with Rust
yuyakato
1
630
DevLOVE関西 自分の現場でやった“こと”と“経験”をみんなが話す会 / DevLOVE Kansai sharing experiences
yuyakato
0
65
Rustの新しい書籍『実践Rust入門』の紹介 / Introduction of Rust bicycle book
yuyakato
0
250
Rubyから世界へ / Let’s start a journey around the world beyond Ruby
yuyakato
0
530
「チームで学ぼう!TensorFlow実践編」第1期で僕が学んだこと
yuyakato
0
300
Other Decks in Programming
See All in Programming
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
Beyond ORM
77web
7
900
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
CSC305 Lecture 26
javiergs
PRO
0
140
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
260
MCP with Cloudflare Workers
yusukebe
2
220
103 Early Hints
sugi_0000
1
230
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
280
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
testcontainers のススメ
sgash708
1
120
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Featured
See All Featured
Making Projects Easy
brettharned
116
5.9k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Gamification - CAS2011
davidbonilla
80
5.1k
Practical Orchestrator
shlominoach
186
10k
Designing for Performance
lara
604
68k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Become a Pro
speakerdeck
PRO
26
5k
GitHub's CSS Performance
jonrohan
1030
460k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
A better future with KSS
kneath
238
17k
Transcript
αʔϚϧϓϦϯλͱRaspberry PiͰ ΧϯόϯΛվળͨ͠ !1 20192݄22(ۚ) IoT LT Osaka Vol.10 (ג)ಹ༝ଟ
Ճ౻༐
࣍ • ࣗݾհ / ࠷ۙͷ੍࡞ • ԿΛ࡞͔ͬͨʁ • Ͳ͏ͬͯ࡞͔ͬͨʁ •
·ͱΊ !2
ࣗݾհ: Ճ౻ ༐ • ιϑτΣΞΤϯδχΞʢ2000ʙʣ • גࣜձࣾಹ༝ଟ දऔకʢ2007ʙʣ ͳ Ώ
ͨ • झຯ: • ͷͮ͘Γશൠ • 3DϓϦϯλʢ2013ʙʣ • ϘϧμϦϯάʢ2011ʙʣ !3 yuyakato1984 nayutaya
τΠϨͷ༻ঢ়گΛΕͨॴʹදࣔ !4 ࠷ۙͷ੍࡞: τΠϨηϯα
࠷ۙͷ੍࡞: ϕουܕମॏܭ 4x4=16ݸͷϩʔυηϧΛ༻ ΩϟϦϒϨʔγϣϯ্͕ख͘ߦ͑ͣ࠳த !5
ԿΛ࡞͔ͬͨʁ !6 ຊʹͬͯ
αʔϚϧϓϦϯλͱRaspberry PiͰ ΧϯόϯΛվળͨ͠ !7
αʔϚϧϓϦϯλͱʁ • ײࢴʹҹ͢ΔϓϦϯλ • ʮϨγʔτϓϦϯλʯʮײࢴϓϦϯλʯ ͱݺΕΔ • ͍҆: ײࢴ͕҆ՁͰϥϯχϯάίετ͕͍҆ •
͍: ҹ͕300mm/s΄Ͳͱ͍ • ্ख͍: ׆ࣈΛҹͰ͖ΔͷͰ៉ྷͳจࣈ !8
Raspberry Piͱʁ • ݴΘͣͱΕͨ ҆ՁͳγϯάϧϘʔυίϯϐϡʔλ • Raspberry Pi 3 Model
B+$35 !9
Χϯόϯͱʁ • εΫϥϜͳͲͷ ։ൃख๏Ͱ༻͍ΒΕΔ • λεΫͷঢ়گΛ ՄࢹԽ͢Δπʔϧ • TodoɺDoingɺDone ͳͲͷϨʔϯ
• ᝦͳͲͰλεΫΛදݱ Wikipediaʮ͔ΜΜ (ιϑτΣΞ։ൃ)ʯΑΓ !10
ཧతͳΧϯόϯͷਏ͍ͱ͜Ζ !11 ͏ͷ͍͍ͩͨ ʮᝦʯͱʮϖϯʯ ࣈΛॻ͘ͷ͕ ਏ͍ɾۤख ࣈ͕Ԛ͗ͯ͢ ࡉ͔͗ͯ͢ ಡΊͳ͍
ͳͷͰ࡞Γ·ͨ͠ !12
࡞ͬͨͷ: λεΫҹγεςϜ !13 GitHubͳͲͷλεΫΛ I s s u e Webϒϥβ͔Β
αʔϚϧϓϦϯλ Λͬͯ ૉૣ͘؆୯ʹ ҹ
Χϯόϯ: αʔϚϧϓϦϯλಋೖલ • ਓʹΑͬͯҟͳΔॻ͖ํ • ಡΊͳ͍ᝦ • ॻ͘ͷ͕໘ͰషΒΕͳ͍ᝦ λ ε
Ϋ !14
Χϯόϯ: αʔϚϧϓϦϯλಋೖޙ • ॻ͔ͳͯ͘ྑ͍ʂ • ಡΈ͍͢ʂ • IssueԽ͞Ε͍ͯͳ͍ ᝦཱ͕ͭʂ λ
ε Ϋ !15
Χϯόϯ: ϏϑΥʔΞϑλʔ !16 αʔϚϧϓϦϯλಋೖલ αʔϚϧϓϦϯλಋೖޙ
Ͳ͏ͬͯ࡞͔ͬͨʁ !17
ϋʔυΣΞ !18 αʔϚϧϓϦϯλ 11,000ԁ https://amzn.to/2XdO0O9 Raspberry Pi 3B+ίϯϓΩοτ 9,500ԁ https://amzn.to/2Nhv8Jw
ϩʔϧࢴ 280ԁʢ1רʣ https://amzn.to/2txyyif USB ·ͨ Ethernet ී௨ͷLinuxϚγϯͰସՄೳ ESC/POSରԠػͳΒͨͿΜԿͰOK 80mm෯ͳΒͨͿΜԿͰOK
ιϑτΣΞ • 4ͭͷιϑτΣΞͰߏ • ҹαʔϏε • ϨϯμϦϯάαʔϏε • WebΞϓϦ •
Google Chrome ֦ு !19 Raspberry PiͷDockerίϯςφ্Ͱಈ࡞ Google ChromeʢWebϒϥβʣ্Ͱಈ࡞
ιϑτΣΞ: ҹαʔϏε !20 HTTP POST USB curl --request POST \
--header "Content-Type: image/png" \ --data-binary @hello.png http://localhost:3030/print ҹαʔϏε PNGը૾Λૹ৴͢Δͱ ϓϦϯλ͔Βҹ͞ΕΔ
ιϑτΣΞ: ϨϯμϦϯάαʔϏε !21 ϨϯμϦϯάαʔϏε HTTP POST curl --request POST \
--header "Content-Type: application/json" \ --data-binary @hello.json \ http://localhost:3031/render_html > hello.png HTMLΛؚΉJSONΛ ೖྗ͢Δͱ ϨϯμϦϯά͞Εͨ ը૾͕ग़ྗ͞ΕΔ HTTP Response
ιϑτΣΞ: WebΞϓϦ !22 ϨϯμϦϯά αʔϏε ҹ αʔϏε HTMLΛWebϒϥβͰೖྗ͢Δͱ αʔϚϧϓϦϯλ ͔Βҹ͞ΕΔ
ιϑτΣΞ: Chrome֦ு !23 ϨϯμϦϯά αʔϏε ҹ αʔϏε αʔϚϧϓϦϯλ ͔Βҹ͞ΕΔ λεΫͷϖʔδΛ։͍ͯϙνͬͱ͢Δͱ
Ԡ༻ྫ • طʹ͍ͬͯΔ͜ͱ: • ன৯ϝϯόʔͷҹ • ͪΐͬͱͨ͠ϝϞͷҹ • ͬͯΈ͍ͨ͜ͱ: •
ΞΠσΞग़͠ / ϒϨΠϯετʔϛϯά • όʔϯμϯνϟʔτͷҹ !24
·ͱΊ • αʔϚϧϓϦϯλʮ͍҆ʯʮ͍ʯʮ্ख͍ʯ • Χϯόϯ͕ΑΓ্ख͘ճΔΑ͏ʹͳͬͨɻ • Ԡ༻࣍ୈͰ͍Ζ͍ΖͰ͖Δ !25
ࢀߟ • QiitaهࣄʰαʔϚϧϓϦϯλͰҹ͢Δ: ࣍ʱ https://qiita.com/yuyakato/items/288962fbc39446644668 • GitHubϦϙδτϦ: nayutaya/thermal-printer https://github.com/nayutaya/thermal-printer !26
!27 ൃදҎ্Ͱ͢