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
ESP32のマルチコアの能力を試してみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
makotaka
October 23, 2018
1
1k
ESP32のマルチコアの能力を試してみた
makotaka
October 23, 2018
Tweet
Share
More Decks by makotaka
See All by makotaka
俺のLPWA
makotaka
1
490
クラウド上のIoT_Platformからドローンを操作_公開用_.pdf
makotaka
1
770
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
A designer walks into a library…
pauljervisheath
210
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
130
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
A Soul's Torment
seathinner
5
2.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Transcript
ESP32のマルチコアの能力を試してみた IoT縛りの勉強会! IoTLT vol.44 @opt @makotaka たかはしまこと
自己紹介 •名前:たかはしまこと •所属:中国系の雲(クラウド)の中 •仕事:ネットワーク関連一般担当 •課外活動:お酒、オートバイ、技術的に興味持ったこと色々 ESP32 〜 Alibaba Cloud IoT
Platform をMQTT接続(Arduino Core版) https://qiita.com/makotaka/items/388fa1ee0eb1f0237012 中国にProxy立ててWebコンテンツがどう見えているかを日本から確認してみた https://qiita.com/makotaka/items/3ccebfb890fd0b17f68b
ESP32とは • WiFi/Bluetoothを内蔵したSoC • 技適マーク付きの物が安価に入手可(約5ドル〜) • Arduino IDEでの開発可(お手軽) • Dual
Core https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20181019164128&SearchText=ESP32
Arduino Coreのコード void setup() { // 起動時に一度だけ実行 } void loop()
{ // 繰り返しループして実行 } Core 0 Core 1 loop() loop関数ではCore 1のみ使用
Arduino Coreのコード void task0{ //処理 } void setup() { xTaskCreatePinnedToCore(task0,
"Task0", 4096, NULL, 1, NULL, 0); } 処理を特定のコアにPIN 対象関数 コアID Core 0 Core 1 loop() task0() コアにPINする関数
疑問 1. コア分散させると処理能力は向上するのか? 2. 消費電力に変化は? 3. Arduino Uno / Raspberry
PI Zero wと比較して はどうか? 「ハノイの塔」計算で勝負してみる
結果 ESP32 Arduino ラズパイ 1. コアに比例し処理能力向上 2. 最大でArduinoの40倍 3. 最大でRaspberry
PI zero wと互角レベル
消費電力(電流の測定) 注意:低精度 数百円のオモチャ利用 目視で計測 10mA単位が限界
消費電力(電流値) ESP32 Arduino (計測不能) ラズパイ 1. Core 0を使うと電流値が上がる傾向 2. Raspberry
PIより効率的 コア0でのプロセスあり
まとめ 1. コアにプロセスを分散(Core0も使用)すると処理能力も上がるがそれ以 上に消費電力も上がる。 2. Raspberry PIの処理速度と比較しても遜色が無い。こともある。 3. マルチコアの用途は以下の場合など? a.
一刻も早く処理を終了する必要がある場合 b. 2つ以上のプロセスがリソースを取り合わないように c. リアルタイム性が求められるプロセス用に空けておく (*)コードや詳細はQiitaでも共有しています。 https://qiita.com/makotaka/items/dd035f4b2db94f87b63c