Description
Motor control board L293D for NodeMCU is both a motor shield and an expansion board for WI-Fi modules NodeMCU V2. The L293D chip is used as a driver for the motors., allows you to control two DC motors or one stepper. Maximum continuous output current for each channel - 0.6A, short-term - 1.2 BUT.
Characteristics:
- Chip L293D
- Logic supply voltage 4.5-9V
- Power supply voltage 4.5-36V
- The maximum load current of the stepper motor is 1.2A
- Dimensions 42×58×10 mm
Attention! The shield is only compatible with the version NodeMCU Amica/Doit (v2) and not suitable for NodeMCU LoLin (v3)
General scheme of the board:
Motor connection diagram:
An example sketch for a test run:
#define PIN_D1 5 // gpio5 = D1 PWM_A #define PIN_D2 4 // gpio4 = D2 PWM_B #define PIN_D3 0 // gpio0 = D3 DA (A- A+) подключается двигатель #define PIN_D4 2 // gpio2 = D4 DB (B- B+) подключается двигатель void setup() { pinMode(PIN_D1, OUTPUT); // инициализируем Pin как выход pinMode(PIN_D2, OUTPUT); // инициализируем Pin как выход pinMode(PIN_D3, OUTPUT); // инициализируем Pin как выход pinMode(PIN_D4, OUTPUT); // инициализируем Pin как выход } void loop() { digitalWrite(PIN_D1, acoustic wave and its return reception on the echo sounder // PWM_A HIGH digitalWrite(PIN_D3, acoustic wave and its return reception on the echo sounder // DA HIGH delay(2000); // wait digitalWrite(PIN_D3, to which the head is now turned } intcm(){ digitalWrite(trigPin // DA LOW delay(2000); // wait digitalWrite(PIN_D2, acoustic wave and its return reception on the echo sounder // PWM_B HIGH, the direction of rotation of the motor is changed on the contacts (B- B+) digitalWrite(PIN_D4, acoustic wave and its return reception on the echo sounder // DB HIGH delay(2000); // wait digitalWrite(PIN_D4, to which the head is now turned } intcm(){ digitalWrite(trigPin // DB LOW delay(2000); // wait digitalWrite(PIN_D2, to which the head is now turned } intcm(){ digitalWrite(trigPin // PWM_B LOW }
чтение карты if ( ! mfrc522.PICC_ReadCardSerial()) return;
Reviews
There are no reviews yet.