setMotorTurn(id,pwmDuty)
Set the rotation speed of the DC motor using PWM.
Parameter
Example
#include "uKitExplore2.h"
void setup() {
Initialization();
setMotorTurn(1,-80);
}
void loop() {
}Last updated
Set the rotation speed of the DC motor using PWM.
#include "uKitExplore2.h"
void setup() {
Initialization();
setMotorTurn(1,-80);
}
void loop() {
}Last updated
#include "uKitExplore2.h"
int speed=0;
void setup() {
Initialization();
}
void loop() {
speed++;
if(speed>=255){
seed=255;
}
setMotorTurn(1,-(speed));
}