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
Flutterでもシリアルコンソール通信 できるもん!
Search
Ryotaro Onoue
September 29, 2023
Programming
0
790
Flutterでもシリアルコンソール通信 できるもん!
YOUTRUST x ゆめみ Flutter LT会@渋谷 #3
https://yumemi.connpass.com/event/294763/
Ryotaro Onoue
September 29, 2023
Tweet
Share
More Decks by Ryotaro Onoue
See All by Ryotaro Onoue
Apple Walletでパスを作るお話
yumnumm
0
130
私がやってきたアウトプット集
yumnumm
0
110
俺/私のこだわりデスク大大大自慢LT大会 (LTFes #12)
yumnumm
0
56
仕事以外で作成したプロダクトの自慢大会
yumnumm
0
59
Cloudflare Workers でプリントシール機の画像共有システムを制作したお話 @serverlessF
yumnumm
0
210
Flutter × Jetpack Composeの相互運用 @ GDG Tokyo 2023
yumnumm
0
1k
DartによるBFF構築・運用 〜 Dart Frog × Melos 〜
yumnumm
2
2.7k
Flutterハンズオン
yumnumm
0
110
Flutterでも地図を描きたいお話
yumnumm
1
500
Other Decks in Programming
See All in Programming
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
イベント駆動で成長して委員会
happymana
1
320
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Ethereum_.pdf
nekomatu
0
460
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
900
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Agile that works and the tools we love
rasmusluckow
327
21k
RailsConf 2023
tenderlove
29
900
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Statistics for Hackers
jakevdp
796
220k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to train your dragon (web standard)
notwaldorf
88
5.7k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Transcript
2023.9.29 FlutterͰγϦΞϧίϯιʔϧ௨৴ Ͱ͖ΔΜ! YUMEMI Inc. Flutter Engineer - Onoue Ryotaro
YOUTRUST × ΏΊΈ Flutter LTձ@ौ୩ #3
0. whoami
1. Today’s topic γϦΞϧίϯιʔϧ௨৴ × Flutter
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ?
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ?
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ?
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ? 71/ϧʔλͱεΠον
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ? Oracle
Cloud Infrastructure ͷ Compute InstanceʹγϦΞϧίϯιʔϧଓ
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ? 0SBDMF$MPVE*OGSBTUSVDUVSFͷ
$PNQVUF*OTUBODFʹγϦΞϧίϯιʔϧଓ
γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧ௨৴ͬͯͳΜͧ? -
γϦΞϧίϯιʔϧ / γϦΞϧϙʔτͱ? 1ʹ1bitͣͭσʔλΛૹड৴͢ΔΠϯλʔϑΣʔεύϥϨϧଓ σΟεϓϨΠϚεͷೖग़ྗΠϯλʔϑΣʔεΛ࣋ͨͳ͍αʔό ΈࠐΈγεςϜʹଓ͢Δͷʹར༻͞Ε͍ͯΔ
CO2ηϯαʔ UD-CO2S 1-2. ۩ମతͳσόΠε
EQIS-1 1-2. ۩ମతͳσόΠε
Ճηϯαʔ EQIS-1 1-2. ۩ମతͳσόΠε (ࠨ): https: // quake.one/sense/
ΑΓ
GNSSड৴ػ 1-2. ۩ମతͳσόΠε https: / / prioris.jp/gnss/
2. FlutterͰγϦΞϧίϯιʔϧ ωΠςΟϒ͡Ό
ԿΛ࡞͍͖͍͔ͬͯͨ 2-0. ඪ - ֓ཁ - CO2ηϯαʔͷΛදࣔɾάϥϑදࣔ -
൚༻ੑͷߴ͍γϦΞϧίϯιʔϧؔ࿈ΫϥεΛ࡞Δ - ϓϥοτϑΥʔϜ - Android, macOS, Linux - iOSOSͷ੍্ݫ͍͠ - ঢ়ଶཧ - riverpod, flutter_hooks
Flutterͷ֎ͷੈքΞΫηε 2-1. ϓϥάΠϯௐࠪ
Flutterͷ֎ͷੈքΞΫηε 2-1. ϓϥάΠϯௐࠪ AndroidͰ࣮ߦ͢ΔͱɺݖݶෆͰౖΒΕΔ - > ΘΓʹusb_serial pluginΛ͏͜ͱͰճආͰ͖Δ
IUUQTHJUIVCDPNKQOVSNJ fl VUUFS@MJCTFSJBMQPSUJTTVFT IUUQTHJUIVCDPNKQOVSNJ fl VUUFS@MJCTFSJBMQPSUJTTVFT
Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ͚Δ 2-2. ϓϥάΠϯ͚Δ࡞ઓ Android ↑ macOS,
Linux, Windows ↑
Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ͚Δ 2-2. ϓϥάΠϯ͚Δ࡞ઓ
Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ͚Δ 2-2. ϓϥάΠϯ͚Δ࡞ઓ usb_serial (Android)
Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ͚Δ 2-2. ϓϥάΠϯ͚Δ࡞ઓ flutter_libserialport (AndroidҎ֎)
Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ͚Δ 2-2. ϓϥάΠϯ͚Δ࡞ઓ Android͔Ͳ͏͔ΛνΣοΫ࣮ͯ͠ΛΓସ͑Δ 👍: ࣮࣌ʹϓϥοτϑΥʔϜͷੈքͷ͜ͱΛߟ͑ͳͯ͘OK!
ڞ௨Խͨ͠SerialConsoleProviderΛୟ͘ 2-3. දࣔ·Ͱͷ࣮ ը໘ߏ - σόΠεબը໘ (deviceSelectorPage) -
ηϯαʔͷใΛදࣔ͢Δը໘ (monitoringPage)
RiverpodͰΰγΰγ͢Δ 2-3-1. σόΠεબը໘ serialConsoleDeviceΛҰཡ͢ΔFutureProviderΛ࡞ͬͯ͋͛ͯ switchࣜ(ύλʔϯϚονϯά)Ͱ [σόΠεແ͠ɾσόΠεҰཡɾ ಡΈࠐΈதɾΤϥʔ]ঢ়ଶͰग़͚͠
RiverpodͰΰγΰγ͢Δ 2-3-1. σόΠεબը໘ σόΠεҰཡͰListTileΛදࣔͯ͠ λοϓ͞ΕͨΒ MonitoringPage ભҠ
RiverpodͰΰγΰγ͢Δ 2-3-2. ϞχλϦϯάը໘ CO2SensorProvider: ଌఆͷอ࣋ɾ։࢝ॲཧ ʮCO2=489,HUM=46.4,TMP=28.6ʯͰྲྀΕͯ͘Δଌఆͷύʔε
RiverpodͰΰγΰγ͢Δ 2-3-2. ϞχλϦϯάը໘ CO2SensorProvider: ଌఆͷอ࣋ɾ։࢝ॲཧ ʮCO2=489,HUM=46.4,TMP=28.6ʯͰྲྀΕͯ͘Δଌఆͷύʔε
< - Starbucks ԣͦ͝͏ళ ࠓ͜͜·ͰདྷΔ·Ͱͷిं(ΓΜ͔͍ઢ) ↓
3. Live Demo PixelͰಈ͔ͯ͠Έ·͢ʙ
FlutterͰγϦΞϧίϯιʔϧ௨৴Ͱ͖ΔΜ! 4. ·ͱΊ ͱ Φν - Flutter͔ͩΒωΠςΟϒ৮Δػೳ͑ͳ͍ΜͰ͠ΐ? -
> ͍͍͑ Plugin͕͋Γ·͢ (વྫ֎͋Γ·͕͢) - γϦΞϧίϯιʔϧ௨৴ͰཧతͳσόΠεͱଓͯ͠ ใΛૹड৴͢Δ͜ͱ͕Ͱ͖Δ - ࠓޙ ՃηϯαʔGNSSड৴ػͷApp࡞͍ͬͯͭ͘ΓͰ͢
FlutterͰγϦΞϧίϯιʔϧ௨৴Ͱ͖ΔΜ! - Flutter͔ͩΒωΠςΟϒ৮Δػೳ͑ͳ͍ΜͰ͠ΐ? - > ͍͍͑ Plugin͕͋Γ·͢ (વྫ֎͋Γ·͕͢)
- γϦΞϧίϯιʔϧ௨৴ͰཧతͳσόΠεͱଓͯ͠ ใΛૹड৴͢Δ͜ͱ͕Ͱ͖Δ - ࠓޙ ՃηϯαʔGNSSड৴ػͷApp࡞͍ͬͯͭ͘ΓͰ͢ 4. ·ͱΊ ͱ Φν pub.devʹग़͍ͯͳ͍͚ͩͰ ίʔυ ͢ͰʹରԠ͞Εͯͨ!!!
FlutterͰγϦΞϧίϯιʔϧ௨৴Ͱ͖ΔΜ! 4. ·ͱΊ ͱ Φν - Flutter͔ͩΒωΠςΟϒ৮Δػೳ͑ͳ͍ΜͰ͠ΐ? -
> ͍͍͑ Plugin͕͋Γ·͢ (વྫ֎͋Γ·͕͢) - γϦΞϧίϯιʔϧ௨৴ͰཧతͳσόΠεͱଓͯ͠ ใΛૹड৴͢Δ͜ͱ͕Ͱ͖Δ - ࠓޙ ՃηϯαʔGNSSड৴ػͷApp࡞͍ͬͯͭ͘ΓͰ͢ - IssueͪΌΜͱಡΈ·͠ΐ͏ - ਂͰஅྗ͕Լ͍ͯ͠Δͱ͖ʹॏཁͳஅΛ͠ͳ͍ํ͕ྑ͍
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠! ࣭ɾؾʹͳΔ͜ͱ͕͋Ε ͍ͭͰ࿈བྷ͍ͩ͘͞! Follow me on X: @YumNumm https:
/ / github.com/YumNumm/CO2SensorViewer