Hello everyone, introduce my name is Zendry and I come from Indonesia
I managed to set aside money to buy a new automatic watch, I just found out from YouTube there is an item called a "watch winder" that functions to charge the watch automatically. I was very interested for buying one, but I was disappointed to find out the price was quite expensive for me
but I didn't give up, I tried to assemble it myself. And I am very happy to know that "Arduino" can help make what I want. But bad news just happened after I bought all the components needed! It must be coding! OMG :o
Then I tried to learn a little about coding, im so confuse! until oneday what I learned and I tried and I copy the code from Youtube video was successfully. Oh GOD, i was so happy.. But I still feel like something is missing (and I pondered for a while), Bruhh.. Where is the button!
I think it will be very cool if there is a button which "if pressed will turn on" and "if pressed again it will off". Guys, only you can please help me. Please
//Data Awal
#include <Stepper.h>
// Jumlah Langkah per Rotasi Motor
const float STEPS_PER_REV = 32;
// Jumlah Langkah yang di Butuhkan
int StepsRequired;
// Pin yang digunakan 8,9,10,11
// Terhubung ke Driver Motor In1, In2, In3, In4
// Urutan Pin 8-10-9-11 Pada Setiap Langkah
Stepper steppermotor(STEPS_PER_REV, 8, 10, 9, 11);
void setup()
{
// Pin stepper Sebagai Output
}
void loop()
{
\
// 5 Rotasi ke Kanan (1 Rotasi Adalah 2050)
steppermotor.setSpeed(500);
StepsRequired = 10250;
steppermotor.step(StepsRequired);
delay(2000);
// 5 Rotasi ke Kiri (1 Rotasi Adalah 2050)
steppermotor.setSpeed(500);
StepsRequired = - 10250;
steppermotor.step(StepsRequired);
delay(2000);
// 5 Rotasi ke Kanan (1 Rotasi Adalah 2050)
steppermotor.setSpeed(500);
StepsRequired = 10250;
steppermotor.step(StepsRequired);
delay(2000);
// 5 Rotasi ke Kiri (1 Rotasi Adalah 2050)
steppermotor.setSpeed(500);
StepsRequired = - 10250;
steppermotor.step(StepsRequired);
// Ulangi Dalam 1 Jam
delay(3600000);
}