Código para Servomotor
487 days
Cpp
#include <Servo.h> Servo servoSG90; // Crea el objeto para controlar el SG90 void setup() { servoSG90.attach(9); // Conecta el SG90 al pin digital 9 } void loop() { // Mueve el SG90 de 0 a 180 grados for (int angulo = 0; angulo <= 180; angulo++) { servoSG90.write(angulo); delay(15); // Retardo para suavizar el movimiento } // Mueve el SG90 de 180 a 0 grados for (int angulo = 180; angulo >= 0; angulo--) { servoSG90.write(angulo); delay(15); } }
Reviews
Valid Azure Point-of-view gun
Properties
Properties describe core aspects of the project.
Pricing & Availability
Distributor | Qty 1 |
|---|
Controls
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.