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

Problem with nodeMCU and L9110 control motor and servo

i am working with nodeMCU and L9110 control motor and servo and I have some problem.
I can control servo but motor is not run.

this is my code:

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "pZ7qh-H0TfMW12UB99XkvcsezkbY_I3n";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Nhat Duong";
char pass[] = "23456789";

// connect motor controller pins to Arduino digital pins
// motor
Servo servo1;

BLYNK_WRITE(V1) {
  int y = param[1].asInt();

  // Do something with y
{
  servo1.write(param[1].asInt());
}
}
BLYNK_WRITE(V2)  { 
   int pinValue = param[2].asInt(); 
{
  digitalWrite(4,param[2].asInt());}
 }
BLYNK_WRITE(V3)  { 
   int pinValue = param[3].asInt(); 
{

  digitalWrite(5,param[3].asInt());}
}
void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  servo1.attach(15);

}

void loop()
{   
  Blynk.run();
   
  
}

Please edit your post to add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

Thank you very much!

In your screenshot, V2 and V3 appear to be button widgets. Buttons don’t provide an array of values, so param[2].asInt(); will return nothing (or possibly zero).

param.asInt(); is the correct syntax.

Pete.

Thank PeterKnight! I will fix it and try again.

Hi PeteKnight!
I had try again follow your tip but motor not run. i think L9110 circuit is broken.
how do you check the L9110 circuit and check the control signal of nodeMCU output?