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
610
DevLOVE関西 自分の現場でやった“こと”と“経験”をみんなが話す会 / DevLOVE Kansai sharing experiences
yuyakato
0
59
Rustの新しい書籍『実践Rust入門』の紹介 / Introduction of Rust bicycle book
yuyakato
0
250
Rubyから世界へ / Let’s start a journey around the world beyond Ruby
yuyakato
0
510
「チームで学ぼう!TensorFlow実践編」第1期で僕が学んだこと
yuyakato
0
300
Other Decks in Programming
See All in Programming
A New Era of Testing
mannodermaus
2
510
From Idea to IDE: Developing Plugins for Android Studio
thisaay
1
220
Pythonで改めて考える「クラス(class)」の使いどころ
os1ma
1
470
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
私のEbitengineの第一歩
qt_luigi
0
450
watsonx.ai Dojo #2 生成AIを使ったアプリ開発入門編
oniak3ibm
PRO
0
180
LangChainの現在とv0.3にむけて
os1ma
4
920
Scala におけるコンパイラエラーとの付き合い方
chencmd
2
430
LangChainでWebサイトの内容取得やGitHubソースコード取得
shukob
0
160
GoのIteratorに詳しくなってしまう
inatonix
1
200
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
180
Featured
See All Featured
Designing with Data
zakiwarfel
98
5k
Scaling GitHub
holman
458
140k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
Building Applications with DynamoDB
mza
90
6k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
The Cult of Friendly URLs
andyhume
76
6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Bash Introduction
62gerente
608
210k
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 ൃදҎ্Ͱ͢