I want to use an esp-01 and a mega arduino to control a stepper motor (28byj-48 + ULN2003) that at blynk will activate when I press a button on the mobile app, or it will activate when the time is determined (using an RTC ds3231 as a reference) that I I also have to put it in the code through the app, and I want that through a module hx711 + load cell, the scale is indicated in the app Having said that and taking into account that I don’t understand programming well, my question more specifically in this topic is: how to put the activate part by the button? (but I accept help with the rest of the project too)
my code by now is
#include <Stepper.h>
#define e1 8
#define e2 8
#define e3 9
#define e4 11
const int passosPorGiro=64;
Stepper mp(passosPorGiro,e1,e2,e3,e4);
void setup(){
mp.setSpeed(500);//RPM
}
void loop() {
for(int i=0;i<64;i++){
mp.step(passosPorGiro);
}
delay(300);
}