Skip to content

Instantly share code, notes, and snippets.

@GOROman
Created September 10, 2023 03:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GOROman/d3e315266556a8772bf84eca9199a12d to your computer and use it in GitHub Desktop.
Save GOROman/d3e315266556a8772bf84eca9199a12d to your computer and use it in GitHub Desktop.
stack-chan Super Slim
#include <M5Unified.h>
#include <Avatar.h>
using namespace m5avatar;
Avatar avatar;
#define SERVO_PIN_A 21
#define SERVO_PIN_B 22
void setup()
{
M5.begin();
avatar.init(); // 描画を開始
pinMode(SERVO_PIN_A, OUTPUT);
pinMode(SERVO_PIN_B, OUTPUT);
}
void loop()
{
digitalWrite(SERVO_PIN_B, HIGH);
delayMicroseconds(1450);
digitalWrite(SERVO_PIN_B, LOW);
delay(500);
digitalWrite(SERVO_PIN_B, HIGH);
delayMicroseconds(1000);
digitalWrite(SERVO_PIN_B, LOW);
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment