Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ラズベリーパイで工場が見える話
Search
Saito5656
June 20, 2022
Programming
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ラズベリーパイで工場が見える話
Unagi.py 勉強会53枚目in スイーツバンクでLT予定の原稿を登録します。よろしくお願いいたします!
Saito5656
June 20, 2022
More Decks by Saito5656
See All by Saito5656
今年やったこと最近やったこと2025
saito5656
0
60
ついに(CDKで)Cognito実装した話
saito5656
0
170
今年やったこと最近やったこと2024
saito5656
0
250
今年やったこと最近やったこと
saito5656
1
240
【ポエム】PythonのWatchdogを調べてみた
saito5656
0
700
LoRaデバイスからAWS IoTに通信やってみた
saito5656
1
360
Local NW データを S3 に転送してみた
saito5656
0
100
シェル芸人見習い修行 〜 ラズパイ で 一発環境 構築してみた 〜
saito5656
1
240
工場でStep FunctionsでStep Functions
saito5656
0
220
Other Decks in Programming
See All in Programming
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
160
GraphQL の onError と Nullability のこれから
quramy
0
190
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
230
R8 の設定見直しでアプリサイズ削減
andpad
0
230
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.9k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
3
620
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
120
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
490
AI-Powered Domain-Driven Design
ziobrando
0
350
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
230
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
100
Seven New Principles of Software Engineering
yegor256
0
370
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
870
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
The Mindset for Success: Future Career Progression
greggifford
PRO
0
550
Raft: Consensus for Rubyists
vanstee
143
7.8k
Accessibility Awareness
sabderemane
1
270
Game over? The fight for quality and originality in the time of robots
wayneb77
1
320
How GitHub (no longer) Works
holman
316
150k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
420
Transcript
ラズベリーパイで工場が見える話 @Saito5656 2022. 6. 25 Unagi.py 勉強会53枚目 in スイーツバンク
自己紹介(Py流は「お前誰よ」でmm) @Saito 5656 情報技術者ではない?が 静岡のITコミュニティに出没する 浜松在住の変なオヂサン にわかだけど製造業の情シス アイコンは同居する🐈
祝・春華堂スイーツバンクさんコラボ記念 『お菓子にまつわるPythonのはなし』
お菓子にまつわるPythonと言えば…コレ! と言うことで少し強引ですが ここからは製造業でのRaspberryPi活用事例をご紹介します
実は勤務先では国内で 30台以上稼働中
春華堂さん近所でも 約20台動いてます 現在の常駐先はnicoe店さんから直線距離700mだったりします 弊社 浜北工場
がしてるのは生産データの自動取得 稼働と停止の自動集計 各色単体の点灯点滅を積算 パターン別の積算時間に再計算
今日の話は全体Architectureのこの部分 IoT hing / gateway MQTTS Factory Machine Tools IoT
topic for Time line IoT topic for summary 今日の話 RPAで 電子日報に入力 sfnで自動集計 生産開始と終了の時刻 設備の稼働/不稼働/停止時間
中身はタワー信号と生産数をpubするloop 作る過程でmethodを整理分類した流れでClass分けもしました
Projectの構成 src ┣ main_Pr.py ┣ awsMQTTconnect.py ┣ data_process.py ┣ init_obj.py
┣ obj_container_Pr.py ┣ sensing.py ┗ /cert sensing、data_process、awsMQTTconnectを呼び出して タワーライト状態と製品通過を検知積算して、AWSにpublish MQTTクライアントを起動してobject作成し、各種triggerでpubするmethod タワーライトの連続点灯を判定して時間を積算、pub用のdatasetも作成 起動時とシフト切り替え時にオブジェクトを初期化するmethod mainで受け渡しする各種オブジェクトとclassオブジェクトを定義 タワーライト状態とワーク通過のロジック信号を設備から受け取る関数 AWS IoTとのmqtts接続に必要な証明書とroot証明書を格納するdirectory
main.py 状態取得->積算->dataset->pub->状態保存のloop
awsMQTTconnect.py AWS IoT mqtt brokerとmqtts確立してpublish
obj_container_Pr.py 環境変数読み込みとmqtt起動、定数定義
init_obj.py obj_containerとshift切替時の初期化
sensing.py タワー状態とワーク通過をロジック受信 CTセンサー利用を想定したmethodも準備
data_process.py タワーライトの連続点灯判定と積算 pub用のdatasetも作成
動作(AWS IoT MQTTクライアントでのsub)
最後に お菓子×Python= とからめて 製造業内作でのRaspberryPi活用事例をご紹介しました いずれIoTピザのような食品IoTも挑戦したく思います 定価のRaspberryPi安定供給が待ち遠しいですね(心の声
参考 本LTを捕捉する内容として以下もご参考ください https://speakerdeck.com/nsaito9628/gong-chang-destep- functionsdestep-functions https://speakerdeck.com/nsaito9628/pycharity202109- pythonwoiothuo-yong-suruxiao-netahua
ご清聴ありがとうございました