Código para Servomotor
0:20
Cpp
#include 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); } }
Ready.
Reviews
Inspect
Valid Azure Point-of-view gun
Controls
Properties
Availability & Pricing
| Distributor | Qty 1 | |
|---|---|---|
Assets
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.