ESP-WROOM-32 Breakout Board “Unopuino32”

IMG_1448Arduino UnoフォームのESP-WROOM-32 Breakout Board “Unopuino32″ (ウノっぽいの32)

2017年5月25日現在: 評価用ベータ版(v0.3)

<概要>

  • ピン配置及び取り付け穴位置がUnoと同一
  • Arduino IDEからの自動書込み対応済
  • IO電圧: 3.3V(裏面に5V入力時の分割用の抵抗パターン有)
  • 本バージョンではUSB-SerialにCH340を使用している為、以下の制限があります
    • シリアルモニタ経由でのリセット時のメッセージの文字化け
      • 実行するプログラムには影響ない事は確認済
      • Serialのbaud rateを設定した後の通信は問題なし
    • Arduino IDEによる書込み時のUpload Speed制限
      • “256000”以下を指定 (それ以上では書き込みエラーが発生)

IDE_Setting

※ESP32はArduino IDEで開発できるがライブラリレベルでの互換性はないので注意

<仕様>

CPU: ESP-WROOM-32 (技適取得済モジュール)

USB-Serial: CH340 T

Schematich

Schematics

pinout

PINOUT

<開発環境の準備>

  1. CH340 ドライバーをインストールする
  2. “Arduino core for the ESP32″をダウンロードし解凍
  3. Arduino インストールフォルダの hardware フォルダに、espressif フォルダを作成
  4. espressif フォルダの中に esp32 フォルダを作成
  5. 解凍した”Arduino core for the ESP32″の中身を esp32 フォルダ内にコピー
  6. espressif\esp32\tools にある get.exe を実行しコマンドプロンプトが消えるまで待つ
  7. Arduino IDEを立ち上げると”ツール”->”ボード”でESP32が選択できる

<関連リンク>

Design Data (Open Source Hardware):

Schematic & Board Layout Data (KiCad)

Gerber Data

Bom

header file for Arduino IDE

CH340ドライバー:

Windows MacOS Linux

ESP-WROOM-32 Information (ESPRESSIF web site)

ESP-WROOM-32 Datasheet

ESP-WROOM-32 Schematic and layout 

Arduino core for the ESP32

<覚書(随時更新)>

  1. サーボを使うときはLEDとして扱うと動くらしい(未確認)
  2. Neopixel(WS2812)を使う(Mr. MartyMacGyver’s code)
  3. I2Cを使う時は標準のwire関数の引数にピンを指定する
    • int SDA32 = 22;
    • int SCL32 = 23;
    • Wire.begin(SDA32, SCL32);
  4. ESP32/ESP8266用I2C OLED(SSD1306)ライブラリ
  5. タイマー割り込みを使う
    • ESP32 example sketchの”RepeatTimer”を参考に以下をコードに追加// Timer Interrupt setting
      hw_timer_t * timer = NULL;
      volatile SemaphoreHandle_t timerSemaphore;
      portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;void IRAM_ATTR onTimer(){
      // Increment the counter and set the time of ISR
      portENTER_CRITICAL_ISR(&timerMux);// ここにタイマー割り込みで実行するコードを記載portEXIT_CRITICAL_ISR(&timerMux);
      // Give a semaphore that we can check in the loop
      xSemaphoreGiveFromISR(timerSemaphore, NULL);
      // It is safe to use digitalRead/Write here if you want to toggle an output
      }void setup() {

      // Create semaphore to inform us when the timer has fired
      timerSemaphore = xSemaphoreCreateBinary();

      // Use 1st timer of 4 (counted from zero).
      // Set 80 divider for prescaler (see ESP32 Technical Reference Manual for more info).
      timer = timerBegin(0, 80, true);

      // Attach onTimer function to our timer.
      timerAttachInterrupt(timer, &onTimer, true);

      // Set alarm to call onTimer function every second (value in microseconds).
      // Repeat the alarm (third parameter)
      timerAlarmWrite(timer, 1000, true);

      // Start an alarm
      timerAlarmEnable(timer);
      }

広告