#include <Servo.h>
Servo monServo;
void setup() {
Serial.begin(9600);
monServo.attach(8);
void loop() {
if (Serial.available() > 0) {
String cmd = Serial.readStringUntil('\n');
cmd.trim();
if (cmd == "ferme") {
monServo.write(180);
} else {
monServo.write(0);
}
}
}