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
54
ついに(CDKで)Cognito実装した話
saito5656
0
160
今年やったこと最近やったこと2024
saito5656
0
240
今年やったこと最近やったこと
saito5656
1
240
【ポエム】PythonのWatchdogを調べてみた
saito5656
0
690
LoRaデバイスからAWS IoTに通信やってみた
saito5656
1
350
Local NW データを S3 に転送してみた
saito5656
0
100
シェル芸人見習い修行 〜 ラズパイ で 一発環境 構築してみた 〜
saito5656
1
230
工場でStep FunctionsでStep Functions
saito5656
0
220
Other Decks in Programming
See All in Programming
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
280
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
350
iOSDCのペンライトを自動制御したい!
akkeylab
0
240
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
730
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
460
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
430
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
280
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
30
13k
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
150
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
180
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.5k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
490
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
750
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
Typedesign – Prime Four
hannesfritz
42
3.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
The Pragmatic Product Professional
lauravandoore
37
7.5k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Agile that works and the tools we love
rasmusluckow
331
22k
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
ご清聴ありがとうございました