目次

ESP32

arduinoideで開発する。

https://github.com/espressif/arduino-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

ESP32で録音 https://kconputing.hatenablog.com/entry/esp32_i2s_recorde

micropython環境

http://itoi.jp/M5Stack.html#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

wifi接続 http://ippei8jp.hatenablog.jp/entry/2017/08/17/113753

camera

https://forum.micropython.org/viewtopic.php?t=6593

httpサーバ

https://dfram.hatenablog.jp/entry/2017/11/12/150357

RTSサーバ

https://qiita.com/tkinjo1/items/671e16d5735c1228af50

OV2640

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

micropython

micropythonで開発する

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

ここのfirmwareを使用

arduino

ESP32のWi-fi設定方法調査

https://lang-ship.com/blog/work/esp32-wi-fi-setting/

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

動作設定