In this class I put myself to the test once again, the whole world of electronics is quite complicated and wide but when you do the research and little by little you get to know how each piece works, it is incredible.
I am definitely learning a lot with each weekly challenge, my recommendation would be to take with a lot of patience the understanding and with a lot of strategy to be able to reach the goals in the times requested.
So I invite you to join me in this new stage, if you have had many doubts with some parts of this challenge, it is possible that this documentation may be a little clearer, I felt a little lost at the beginning but I made it! 💪🥰
In this task, together with Stefany Casanova , we explored the power consumption of a system based on an ATtiny1614 microcontroller connected to an MG996R servo. Using a digital multimeter, we measured both voltage and amps in different states of the device, facing technical challenges such as series measurement for current. This experience not only allowed us to document the energy behavior of the circuit, but also to learn valuable lessons about the handling of measuring instruments and the importance of teamwork in electronics projects.💪
This week we are asked to add an output device to a microcontroller board that I have designed and program it to do something.
In my case I chose to work with a servo motor so I could analyze the operation.
//Mayra Ascencio Calderón
//Fab Academy
//Summary
#include
Servo servo1;
const int pinservo1 = 1; // Pin para el servo
const int ledPin = 8; // Pin para el LED
void setup() {
servo1.attach(pinservo1); // Inicializa el servo
pinMode(ledPin, OUTPUT); // Configura el pin del LED como salida
}
void loop() {
// Movimiento 1
digitalWrite(ledPin, HIGH); // Enciende el LED
servo1.write(0); // Mueve el servo a 0 grados
delay(500); // Tiempo para completar el movimiento
digitalWrite(ledPin, LOW); // Apaga el LED
delay(500); // Pausa para notar el apagado
// Movimiento 2
digitalWrite(ledPin, HIGH); // Enciende el LED
servo1.write(30); // Mueve el servo a 30 grados
delay(1000); // Tiempo para completar el movimiento
digitalWrite(ledPin, LOW); // Apaga el LED
delay(500); // Pausa para notar el apagado
// Movimiento 3
digitalWrite(ledPin, HIGH); // Enciende el LED
servo1.write(60); // Mueve el servo a 60 grados
delay(2000); // Tiempo para completar el movimiento
digitalWrite(ledPin, LOW); // Apaga el LED
delay(500); // Pausa para notar el apagado
}