LoginSignup
0
1

More than 5 years have passed since last update.

M5GoのマイクをArduinoで使う

Last updated at Posted at 2018-11-25

目的

M5GO/Fireに内蔵しているマイクをArduinoで読み取ってみる。

準備

アナログピン34番から読み出すことができます。

実装例

#include <M5Stack.h>

int analogPin = 34;
void setup() {
  M5.begin();
  dacWrite(25, 0); // Speaker OFF
  pinMode(analogPin, INPUT);
}

void loop() {
  int val = analogRead(analogPin);    // アナログピンを読み取る
  Serial.println(val);
  delay(1);
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1