ユーザ用ツール

サイト用ツール


esp32

ESP32

esp32cam

ESP32-CAM(MicroPython)からサーバーへ画像をPOSTする https://qiita.com/tkinjo1/items/80be243d9f208930cc77

約800円のESP32-CAMで乾電池駆動のWebカメラサーバーを立てる https://qiita.com/Nabeshin/items/b195cad1afe99ce29f1e

ESP32-CAMをテスト https://tomono.tokyo/2019/03/11/7519/

接続URL

http://esp32camip
http://esp32camip:81/stream/

pin接続

usg-ttlコンバータと接続

usb:gnd-gnd(黒)=esp32cam:gnd 
usb:rx -tx(白) =esp32cam:uot  
usb:tx -rx(緑) =esp32cam:uor  

arduinoシリアルポート

シリアルモニタのboudrateを115200とする

ardiuno web-server

webserver+raspi https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/

ESP32-CAM 開発ボード WiFi Bluetoothカメラモジュール 簡単ビルド方法 https://blog.bouhan-tool.com/all/esp32-cam

I2S

micropython環境

esp32cam firmware1

動作した

esp32cam firmware2

import networkが使えない・・惜しい

framesize(size)
  size == 1 FRAMESIZE_QQVGA  // 160x120
  size == 2 FRAMESIZE_QQVGA2 // 128x160
  size == 3 FRAMESIZE_QCIF   // 176x144 
  size == 4 FRAMESIZE_HQVGA  // 240x176
  size == 5 FRAMESIZE_QVGA   // 320x240
  size == 6 FRAMESIZE_CIF    // 400x296
  size == 7 FRAMESIZE_VGA    // 640x480
  size == 8 FRAMESIZE_SVGA   // 800x600
  size == 9 FRAMESIZE_XGA    // 1024x768  (default)
  size == 10 FRAMESIZE_SXGA  // 1280x1024
  size == 11 FRAMESIZE_UXGA  // 1600x1200
  size == 12 FRAMESIZE_QXGA  // 2048x1536
pixformat(num)
  0:JPEG (default) 1:Grayscale  2:RGB565
contrast(num)
  num -2,2 (default 0). 2 highcontrast
quality(num)
  num  10-63 lower number means higher quality
saturation(num)
  num -2,2 (default 0). -2 grayscale
brightness(num)
  num -2,2 (default 0). 2 brightest
whitebalance(num)
  0-4 (default 0) 1sunny 2cloudy 3office 4home

esp32cam firmware3

wifi

camera

httpサーバ

RTSサーバ

OV2640

micropythonがcameraをサポートしていないのでspi経由でデータを取得する
namato/micropython-ov2640 https://github.com/namato/micropython-ov2640/blob/master/ov2640.py

micropython

micropythonで開発する

  • esp32spiram-idf3-20200402-v1.12-331-ge97bb58f0.bin をインストール

ESP32-CAM(MicroPython)からサーバーへ画像をPOSTする https://qiita.com/tkinjo1/items/80be243d9f208930cc77

ここのfirmwareを使用

arduino

arduinoIDEの設定

ここではubuntuの環境構築を想定
(chromebook上のlinuxでもarduinoIDEは動作するがボードに書き込めなかった)

ダウンロードしてinstall.shを実行してarduinoIDEをセットアップしておく

python2(python python-pip)をインストール

sudo apt install python python-pip

環境設定

参照)https://docs.m5stack.com/#/en/arduino/arduino_development

  • 「ファイル」ー「設定」ー「追加のボードマネジャのURL」にhttps://dl.espressif.com/dl/package_esp32_index.jsonを設定
  • 「ツール」ー「ボード」ー「ボードマネジャ…」で“ESP32”で検索しインストール
  • 「スケッチ」ー「ライブラリをインクルード」ー「ライブラリを管理」で“ESP32”で検索し必要なものをインストール

動作設定

esp32.txt · 最終更新: 2020/11/12 01:54 by nabezo