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
400
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ラズベリーパイで工場が見える話
Unagi.py 勉強会53枚目in スイーツバンクでLT予定の原稿を登録します。よろしくお願いいたします!
Saito5656
June 20, 2022
Transcript
20 slides
ラズベリーパイで工場が見える話 @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
ご清聴ありがとうございました
More Decks by Saito5656
See All by Saito5656
今年やったこと最近やったこと2025
saito5656
0
65
ついに(CDKで)Cognito実装した話
saito5656
0
180
今年やったこと最近やったこと2024
saito5656
0
260
今年やったこと最近やったこと
saito5656
1
240
【ポエム】PythonのWatchdogを調べてみた
saito5656
0
710
LoRaデバイスからAWS IoTに通信やってみた
saito5656
1
370
Local NW データを S3 に転送してみた
saito5656
0
110
シェル芸人見習い修行 〜 ラズパイ で 一発環境 構築してみた 〜
saito5656
1
240
工場でStep FunctionsでStep Functions
saito5656
0
220
Other Decks in Programming
See All in Programming
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
AI Augmentation Techniques with Liberty
ivargrimstad
1
550
あなたはMCPの機能を、まだ知らない。
4geru
1
730
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
140
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
200
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
260
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
400
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
510
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
正解の無い問題を 「できるだけ上手く」解く ヒューリスティックで感性を磨こう。〜現実課題をプログラミングで解きあうコミュニティについて〜
allegrogiken
0
110
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Odyssey Design
rkendrick25
PRO
3
970
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
650
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Believing is Seeing
oripsolob
1
290
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Making Projects Easy
brettharned
120
6.9k
Into the Great Unknown - MozCon
thekraken
41
2.8k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
360
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k