BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Arduino-Uno-L298-Steppermotor-HC-05-Controll

Hello everyone

I’m a beginner with Arduino and Blynk and have a issue.

My Setup is an Arduino Uno with an L298 driver an HC-05 Bluetooth module and an nema 17 bipolare Steppermotor.

My question is how to het an Step H button running in the app to controll my steppermotor to go left ot right. No Position just right left and stop.

Thank you

Hey there.

Just add a step h widget and set the minimum value to -1 and the maximum value to 1 so you will have 3 values (-1 , 0 , 1) then attach it to a virtual pin for example v1 then use this :

BLYNK_WRITE(V1) {
  switch (param.asInt())
  {
    case -1: 
      // Motor left code ;
      break;
    case 0: 
      // Motor Stop code ;
      break;
    case 1: 
     // Motor right code ;
      break;
    default:
      Serial.println("select direction");
  }
}