====== ESP32 - Wi-Fi と Bluetooth を内蔵する低コストで低消費電力な SoC のマイクロコントローラ ====== {{:hardware:arduino:lilygo-ttgo-t7-v15-mini32-esp32-wrover-b.png?230|Lilygo TTGO T7 v1.5 mini32 ESP32-WROVER-B}} {{:hardware:arduino:esp32_espressif_esp-wroom-32_dev_board.jpg?110|ESP32 Espressif ESP-WROOM-32 Dev Board}} {{:hardware:arduino:esp32_espressif_esp-wroom-32_shielded.jpg?110|ESP32 Espressif ESP-WROOM-32 Shielded}}\\ [[https://ja.aliexpress.com/item/32977375539.html|Lilygo®Ttgo t7 v1.5 mini32 ESP32 WROVER B psram wI fi Bluetoothモジュール開発ボード - AliExpress]],\\ [[https://commons.wikimedia.org/wiki/File:ESP32_Espressif_ESP-WROOM-32_Dev_Board.jpg|File:ESP32 Espressif ESP-WROOM-32 Dev Board.jpg - Wikimedia Commons]],\\ [[https://commons.wikimedia.org/wiki/File:ESP32_Espressif_ESP-WROOM-32_Shielded.jpg|File:ESP32 Espressif ESP-WROOM-32 Shielded.jpg - Wikimedia Commons]] より\\ \\ 本家: [[https://www.espressif.com|Wi-Fi & Bluetooth MCUs and AIoT Solutions I Espressif Systems]]\\ ソースコード: [[git>espressif|Espressif Systems - Espressif Systems has 141 repositories available. Follow their code on GitHub.]]\\ ドキュメント: [[https://www.espressif.com/en/support/documents/technical-documents|Technical Documents | Espressif Systems]]\\ プログラミング ガイド: [[https://docs.espressif.com/projects/esp-idf/en/latest/esp32/index.html|ESP-IDF Programming Guide - ESP32 - — ESP-IDF Programming Guide latest documentation]]\\ ツール: [[https://www.espressif.com/en/support/download/other-tools|Tools | Espressif Systems]]\\ ブログ: [[https://blog.espressif.com|The ESP Journal - Medium]]\\ マイルストーン: [[https://www.espressif.com/en/company/about-us/milestones|Milestones | Espressif Systems]]\\ **ESP32** シリーズは Wi-Fi と Bluetooth を内蔵する低コスト、低消費電力な SoC のマイクロコントローラである。 Tensilica のXtensa LX6 マイクロプロセッサを採用しデュアルコアとシングルコア版のバリエーションがある。ESP32 は上海に拠点を置く Espressif Systems が開発をし TSMC の 40nm 工程で製造されている。\\ [[wwjp>ESP32|Wikiwand - ESP32]] より\\ ===== 機能 / 特徴 ===== Espressif ESP32 チップ 機能ブロックダイアグラム\\ {{:hardware:arduino:espressif_esp32_chip_function_block_diagram.svg?800|Espressif ESP32 Chip Function Block Diagram.svg}}\\ [[wp>ESP32|ESP32 - Wikipedia(en)]], [[https://commons.wikimedia.org/wiki/File:Espressif_ESP32_Chip_Function_Block_Diagram.svg|File:Espressif ESP32 Chip Function Block Diagram.svg - Wikimedia Commons]] より\\ ===== 開発環境の構築 ===== [[:linux:arduino_ide|Arduino IDE (Linux)]]\\ [[:windows:arduino_ide|Arduino IDE (Windows)]]\\ ==== CP210x ドライバのインストール ==== Windows では [[https://jp.silabs.com/interface/usb-bridges/classic/device.cp2102|{{term_sku:1}} クラシック USB - UART ブリッジ - Silicon Labs]] より、[[https://jp.silabs.com/documents/public/software/CP210x_Universal_Windows_Driver.zip|CP210x ユニバーサル Windows ドライバ (CP210x_Universal_Windows_Driver.zip)]] をダウンロードする。\\ CP210x_Universal_Windows_Driver.zip を解凍して silabser.inf を右クリックしてインストールする。\\ {{:hardware:arduino:esp32_cp210x_driver_install_001.png?600|}} {{:hardware:arduino:esp32_cp210x_driver_install_002.png?200|}} {{:hardware:arduino:esp32_cp210x_driver_install_003.png?400|}} ===== ESP32 で Web サーバー、WebSocket、REST API を超手軽に実装 ===== **ESP32 with Web Server, Telnet Server, file system and FTP Server**\\ ソースコード: [[https://github.com/BojanJurca/Esp32_web_ftp_telnet_server_template|BojanJurca/Esp32_web_ftp_telnet_server_template: ESP32 with Web Server, Telnet Server, file system and FTP server]]\\ ESP32 で Web サーバー、Telnet サーバー、FTP サーバーを実現する、オープンソースでカスタマイズ可能なテンプレートです。MIT ライセンスで自由に利用できる。\\ ソースコードをダウンロードして Arduino IDE で初期設定をしてから ESP32 に書き込むだけで利用可能になる。\\ 更に、Web サーバーと WebSocket で動作するオシロスコープのサンプルが付属している🥰\\ $ mkdir ~/Arduino && cd ~/Arduino $ git clone --depth 1 https://github.com/BojanJurca/Esp32_web_ftp_telnet_server_template.git
Cloning into 'Esp32_web_ftp_telnet_server_template'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 59 (delta 10), reused 5 (delta 1), pack-reused 0
Receiving objects: 100% (59/59), 1.01 MiB | 1.22 MiB/s, done.
Resolving deltas: 100% (10/10), done.
**Esp32_web_ftp_telnet_server_template.ino** を Arduino IDE で開く。\\ {{:hardware:arduino:arduino_ide_esp32_web_ftp_telnet_server_template_001.png?800|Esp32_web_ftp_telnet_server_template - Arduino IDE 001}}\\ #define HOSTNAME "MyESP32Server" // define the name of your ESP32 here #define MACHINETYPE "ESP32 NodeMCU" // describe your hardware here #define DEFAULT_STA_SSID "YOUR_STA_SSID" // define default WiFi settings (see network.h) #define DEFAULT_STA_PASSWORD "YOUR_STA_PASSWORD" #define DEFAULT_AP_SSID "" // HOSTNAME // set it to "" if you don't want ESP32 to act as AP #define DEFAULT_AP_PASSWORD "YOUR_AP_PASSWORD" // must be at leas 8 characters long #define DEFAULT_NTP_SERVER_1 "1.si.pool.ntp.org" // define default NTP severs ESP32 will synchronize its time with #define DEFAULT_NTP_SERVER_2 "2.si.pool.ntp.org" #define DEFAULT_NTP_SERVER_3 "3.si.pool.ntp.org" // define TIMEZONE KAL_TIMEZONE // define time zone you are in (see time_functions.h) // #define USER_MANAGEMENT NO_USER_MANAGEMENT // define the kind of user management project is going to use (see user_management.h) // #define USER_MANAGEMENT HARDCODED_USER_MANAGEMENT // (default) #define USER_MANAGEMENT UNIX_LIKE_USER_MANAGEMENT ===== ESP32 MicroPython ===== [[.esp32:install_micropython|MicroPython のインストール]]\\ ===== ESP32 Rust ===== [[rust:rust_on_esp_install|ESP32 Rust 開発環境のインストール]]\\ ==== クイックリファレンス ==== [[https://micropython-docs-ja.readthedocs.io/ja/latest/esp32/quickref.html|]]\\ ===== ピン アサイン ===== | {{:hardware:arduino:lilygo_ttgo_t8_v1.8_esp32-wrover-b.avif|LILYGO® TTGO T8 V1.8 ESP32-WROVER-B}} | {{:hardware:arduino:lilygo_ttgo_t7_mini32_v1.5_esp32-wrover-b.avif|LILYGO® TTGO T7 Mini32 V1.5 ESP32-WROVER-B}} | | [[https://www.tele.soumu.go.jp/giteki/SearchServlet?pageID=jg01_01&PC=211&TC=N&PK=1&FN=181228N211&SN=%94%46%8F%D8&LN=56&R1=*****&R2=*****|ESP32-WROVER-B 認証番号: 211-180419]] || [[git>Xinyuan-LilyGO/LILYGO-T8/blob/main/Schematic/T8_V1.8.pdf|LILYGO-T8 V1.8/Schematic at main · Xinyuan-LilyGO/LILYGO-T8]]\\ [[git>LilyGO/TTGO-T7-Demo/blob/master/t7_v1.5.pdf|LILYGO-T7 V1.5/Schematic - LilyGO/TTGO-T7-Demo]]\\ **ESP32 SD Card**\\ ^ スロット | 0 | 1 | 2 | 3 | ^ Signal ^ ピン ^^^^ ^ sck | 6 | 14 | 18 | 14 | ^ cmd | 11 | 15 | | | ^ cs | | | 5 | 15 | ^ miso | | | 19 | 12 | ^ mosi | | | 23 | 13 | ^ D0 | 7 | 2 | | | ^ D1 | 8 | 4 | | | ^ D2 | 9 | 12 | | | ^ D3 | 10 | 13 | | | ^ D4 | 16 | | | | ^ D5 | 17 | | | | ^ D6 | 5 | | | | ^ D7 | 18 | | | | [[https://micropython-docs-ja.readthedocs.io/ja/latest/library/machine.SDCard.html#esp32|クラス SDCard -- SD メモリカード — MicroPython 1.18 ドキュメント]] より\\ **ESP32-WROOM-32 (30pin)**\\ ^ ^ | [[https://www.tele.soumu.go.jp/giteki/SearchServlet?pageID=jg01_01&PC=211&TC=N&PK=1&FN=181126N211&SN=%94%46%8F%D8&LN=3&R1=*****&R2=*****|ESP32-WROOM-32 認証番号: 211-161007]] | **ESP32-WROOM-32 (38pin)**\\ ^ ^ ===== .NET nanoFramework ===== 本家: [[https://www.nanoframework.net/|.NET nanoFramework – Making it easy to write C# code for embedded systems.]]\\ ソースコード: [[https://github.com/nanoframework|.NET nanoFramework]]\\ WiKi: [[wpjp>.NET Micro Framework|.NET Micro Framework - Wikipedia]] (*1)\\ ***1**: 2021/03/03 現在 .NET nanoFramework に関する Wikipedia はまだ存在していませんが、.NET Micro Framework の Wikipedia の歴史に記載があります。.NET nanoFramework は .NET Micro Framework の副産物との事です。\\ **.NET nanoFramework** は、.NET Micro Framework が中断したところをピックアップして、その構成要素の一部を使用します。元のコンポーネントの多くは完全に書き直され、その他は改善され、一部は単に再利用されました。.NET nanoFramework を将来に適合させるために、多くのコードクレンジングと改善が行われた。\\ [[https://docs.nanoframework.net/|.NET nanoFramework | nanoFramework Documentation]] より\\ [[https://github.com/nanoframework|.NET nanoFramework]] で C# が使えるとの事ですが、私はまだ試していません😅💦\\ $ dotnet tool install -g nanoFirmwareFlasher $ nanoff --update --target ESP32_WROOM_32 --serialport COM? 参考: [[https://whuysentruit.medium.com/running-net-on-esp32-e9e953e591a6|Running .NET on ESP32. Introduction | by Wouter Huysentruit | Medium]]\\ ===== 参考文献 ===== [[https://whuysentruit.medium.com/running-net-on-esp32-e9e953e591a6|Running .NET on ESP32. Introduction | by Wouter Huysentruit | Medium]]\\ [[http://marchan.e5.valueserver.jp/cabin/comp/jbox/arc212/doc21201.html|ESP32・BLE通信「基礎知識」]]\\ [[https://lang-ship.com/blog/work/esp32-esp8266/|ESP32、ESP8266の選び方]]\\ [[https://kohacraft.com/archives/202002201253.html|ESP32-WROVWE-Bで4MBもの広大なメモリ空間を手にいれる]]\\ [[https://www.espressif.com/en/news/ESP32_S3|Announcing ESP32-S3 for AIoT Applications | Espressif Systems]]\\ * ESP32-S3 の AIoT、AIアクセラレーションサポート\\ [[https://rt-net.jp/mobility/archives/14395|ESP32マウスPart.41 ESP32でファイルシステムを扱う]]\\ [[https://spiceman.jp/esp32-wroom-32d/|ESP32-WROOM-32D開発ボードの仕様・機能 | Spiceman]]\\ [[https://esp32.com/viewtopic.php?t=10711|manually entered download mode, saw "waiting for download", what is next? - ESP32 Forum]]\\ [[https://hangstuck.com/arduino-buildpath-fix/|Arduino IDEのビルドを速くする|オブジェクトファイルの出力先を固定する]]\\ [[https://www.sunrom.com/p/xc6206p332mr-662k|XC6206P332MR (662K) [4252] : Sunrom Electronics]]\\ [[https://trac.switch-science.com/wiki/esp32_tips|esp32_tips – スイッチサイエンス]]\\ [[https://magazine.halake.com/entry/scratch_extension_firmata|Scratch × Firmata ×Python 自作ブロック ~ Arduino制御 - HaLake Magazine]]\\ [[git>espressif/esp-idf/issues/965|Cant get a MicroSD card to work. (IDFGH-5170) · Issue #965 · espressif/esp-idf]]\\ [[https://circuitdigest.com/microcontroller-projects/diy-esp32-oscilloscope|DIY ESP32 Oscilloscope]]\\ [[git>Circuit-Digest/ESP32-Oscilloscope|Circuit-Digest/ESP32-Oscilloscope]]\\ [[https://www.olimex.com/Products/FPGA/iCE40/iCE40-ADC/open-source-hardware|]]\\ \\ **電圧計測**\\ [[https://labo.mycabin.net/electronics/arduino-esp32/735/|ESP32のADコンバータを調整:ESP-IDFのドライバAPIでキャリブレーションしてみる | * いしのなかにいる * :工兵のラボ]]\\ [[https://www.cqpub.co.jp/hanbai/books/42/42101/42101_6syo.pdf|]]\\ \\ **TTGO**\\ [[git>LilyGO/TTGO-T7-Demo|LilyGO/TTGO-T7-Demo]]\\ [[git>LilyGO/TTGO-T8-ESP32|LilyGO/TTGO-T8-ESP32: esp32-i2s-sdcard-wav-player]]\\ ==== 付録 ==== [[tw>tomoyan596/status/1361692599854067712|ESP32でBluetoothプログラミングのお勉強しています🤤 / Twitter]]\\ [[tw>tomoyan596/status/1416857780162502658|ブラ男氏は14歳で人間年齢では68歳で、高齢者なので身体のいろいろな機能の衰えが確かに気になるところではあります🤔以前、獣医に診てもらったら、血液検査ではコレステロール数値や心臓の不整脈が指摘されていますが、最近ウェルネス産業も進化してますよねぇ🤔 / Twitter]]\\ [[tw>tomoyan596/status/1433521189943603200|以前はアリエクさんからESP32を404円か459円で買えていましたけど、為替の影響かなぁ?最近は送料含めると830~910円くらいになりそうなので、国内で安いのさがそうかなぁ🤔 / Twitter]]\\ [[tw>tomoyan596/status/1469520022897045504|esp32のip4_addr_tの型定義が変わってハマってるのは、私だけではないみたいでホットしました🤤 / Twitter]]\\ [[tw>tomoyan596/status/1470044099164393479|ESP32のことを調べてたらですねぇ、WiFiのパスフレーズをもぐもぐしてるHash Monsterというのを発見しまして...🤔かわいいフリしておいしいものを食べてる方がよいかなぁ🤤 / Twitter]]\\ [[tw>tomoyan596/status/1520513433833132032|TTGO T8 V1.8の回路図は見つけましたけど...🤔 T7 V1.5も探します😊]]\\ [[tw>tomoyan596/status/1520528225243344896|TTGO T7 V1.5の回路図も見つけました🤔]]\\ [[tw>tomoyan596sp/status/1589706218343665664|50年ものの骨董電圧計をESP32のDACで弄くり回す🤔 50V電圧計は50kΩ抵抗が入ってて、1mAを電流計に流してるので、2.2kΩ+2k可変抵抗で3.3kΩ付近に微調整して、マイコンから0~3.3VをDACで出力します😊しかし、細かい課題は多い😅💦]]\\ [[tw>tomoyan596sp/status/1656868321663549450|デバイスは人の気配を感じ取れるというのはわかる🤔👻もたぶん😅東洋医学も波動を医療に応用しているし...🤔ESP-CSI Solutionhttps://t.co/kIpYORvWadWi-ESP - A tool for CSI-based Device-Free Wi-Fi Sensing (DFWS)]]\\