1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

M5Stack 振動モータで遊ぶ。(UNO)(スタックチャンフェス、100円で入手)

Last updated at Posted at 2025-04-08

いろいろ、注意

  • 過去ログを見てね
  • モータ、リレーを繋いだ時の安全対策は、各自、行うように。
  • 振動モーターは、思ったより、激しいので注意
  • 最悪、マイコンが壊れるも、やだな思い、互換のUNO3を選択(壊れた、時は、表面実装CPUを張り替えようと思った)(ちなみにモバイルバッテリで駆動)

目的

とりあえず、モータを回してみた

結果(わかりずらいが激しく振動)

image_original (79).jpg

プログラム



//sindou_UNO


void setup() {
  // put your setup code here, to run once:

  //GPIOの初期化
  pinMode(A4, OUTPUT);
  digitalWrite(A4, LOW);

}//setup


void loop() {
  // put your main code here, to run repeatedly:

  //GPIOをオンにする
  digitalWrite(A4, HIGH);
  delay(1000); //1秒待つ

  //GPIOをオフにする
  digitalWrite(A4, LOW);
  delay(1000); //1秒待つ

} //loop


1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?