Recently, I was working on a simple small project , use stm32 Make an intelligent car , I use it 32 The plate is a punctual atom stm32mini of . In the future, I will continue to update the project dynamics and actively share experiences and procedures with you .

This is the preliminary of the car —— motor drive

My car parallels a row of motors on the left , Parallel the motors on the right , It will be more convenient and simple to find a parallel motor .

First, the motor drive module uses L9110 This module ,L9110 It is simple to drive a DC motor , Output equals supply voltage .

For the trolley motor PWM Aspects are quite simple .
I use a timer 3 Channel for 1 And channels 3, set up TIM3_CH1 and TIM3_CH3 of PWM pattern .

Because I started driving with a timer TIM1 It's complicated , Configuration is not easy .

also keil5 Compiler solid library is not very clear , I suggest that you configure the motor at high and low levels , Do not install the .c Direct macro definition in file , System disapproval .

It is better to define the driver function directly in the main function .

And I made a mistake Undefined symbol time (referred from dianji.o).

program :
void ahead(void)// Define forward function { A1=1; A2=0; B1=1; B2=0; } void back(void)// Define fallback function {
A1=0; A2=1; B1=0; B2=1; } void STOP(void)// Define stop function { A1=0; A2=0; B1=1; B2=1; }
void right(void)// Define right turn function { A1=1; A2=0; B1=1; B2=1; } void left(void)// Define left turn function {
A1=0; A2=0; B1=1; B2=0; } int main(void) { system_Clock_Init(); // System clock setting
uart_init(115200); // Serial port is initialized to 115200 delay_init(); // Delay initialization TIM3_PWM_Init();
dianji_Init(); while(1) { ahead(); } }

Technology
©2019-2020 Toolsou All rights reserved,
C++ of string of compare usage MySQL Basics Commonly used sentence ( Add / delete / modify query )C Language of a Gobang game implementation QT5.9 Use of learning notes QSqlQuery Method of Qt Getting Started tutorial 【 Basic controls 】QCalendarWidget calendar control java Polymorphic array of web Front end signature plug-in _signature_pad Plug in implements electronic signature function centos7 install RabbitMqspringboot use redis Experiment 4 Automated test tools - software test