This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Programa simple de giro continuo del motor bipolar | |
int motorPin1 = 13; // pines del Motor | |
int motorPin2 = 12; | |
int motorPin3 = 3; | |
int motorPin4 = 11; | |
int delayTime = 100; // Delay que determina la velocidad de giro | |
void setup() { | |
pinMode(motorPin1, OUTPUT); // Configuración de los PINes como salida digital |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************* | |
Motor Shield Paso-Paso | |
https://conbotassucias.wordpress.com/ | |
*************************************************************/ | |
int delaylegnth = 30; | |
void setup() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************* | |
Motor Shield Paso-Paso | |
https://conbotassucias.wordpress.com/ | |
*************************************************************/ | |
int delaylegnth = 30; | |
void setup() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************* | |
Motor Shield 2 Motores DC | |
https://conbotassucias.wordpress.com/ | |
*************************************************************/ | |
void setup() { | |
//Configuración Canal A | |
pinMode(12, OUTPUT); // Iniciar Canal Motor A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Robot seguidor de linea | |
https://conbotassucias.wordpress.com/ | |
************************************************/ | |
int pin2 = 2; //damos nombre al pin 2 | |
int pin4 = 4; //damos nombre al pin 4 | |
void setup() { | |
pinMode (pin2, INPUT); | |
pinMode (pin4, INPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Tutorial Arduino Servo | |
https://conbotassucias.wordpress.com/ | |
************************************************/ | |
#include <Servo.h> // Carga la librería Servo.h que contiene métodos para trabajar con servos | |
Servo myservo; // Crea un objeto servo para controlar el servomotor | |
int potpin = 0; // Pin analógico usado para conectar el potenciómetro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Tutorial Arduino Servo | |
https://conbotassucias.wordpress.com/ | |
************************************************/ | |
#include <Servo.h> // Carga la librería Servo.h que contiene métodos para trabajar con servos | |
Servo myservo; // Crea un objeto servo para controlar el servomotor | |
int potpin = 0; // Pin analógico usado para conectar el potenciómetro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Arduino Servo | |
https://conbotassucias.wordpress.com/ | |
Proyecto tipo servo, carga un angulo fijo | |
************************************************/ | |
#include <Servo.h> // Carga la librería Servo.h que contiene métodos para trabajar con servos | |
Servo miServo; | |
int angulo=90; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Tutorial Arduino Motor Shield REV3 | |
https://conbotassucias.wordpress.com/ | |
************************************************/ | |
void setup() { | |
//Configuración Canal A | |
pinMode(12,OUTPUT); //Iniciar Motor Canal A | |
pinMode(9,OUTPUT); //Iniciar Freno Canal A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Valido para ver cambios de estado en una variable | |
https://conbotassucias.wordpress.com/ | |
*/ | |
const int pulsador = 3; // el numero de pin del pulsador | |
const int led = 13; // el numero del pin del LED | |
const long timeledon = 2000; // tiempo en que la led esta encendida en ms | |
// variables: | |
int EstadoActual = 0; |