#include <ESP32Servo.h>
#define FRL_PIN 13
#define BRL_PIN 2
#define FLL_PIN 22
#define BLL_PIN 15
const int STAND_ANGLE = 90;
Servo FRL, BRL, FLL, BLL;
bool isStanding = false;
void setup()
{
Serial.begin(115200);
FRL.attach(FRL_PIN);
BRL.attach(BRL_PIN);
FLL.attach(FLL_PIN);
BLL.attach(BLL_PIN);
stand(); // Move once at startup
}
void loop()
{
// nothing for now
}
void stand()
{
if (!isStanding)
{
FRL.write(STAND_ANGLE);
BRL.write(STAND_ANGLE);
FLL.write(STAND_ANGLE);
BLL.write(STAND_ANGLE);
isStanding = true;
}
}