I am Xiaobai , Make some small things at home during the summer vacation . What I want to share with you this time is based on STM32F103 The production of the tracking car .（ Two wheels ）
Main hardware ： board ,L298N, electric machinery ,4 Tracking modules, etc
Don't talk much , Dry goods first .
#include "XJ.h"// Trace file
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING;// Configuration as floating input , The pin level can be read
// Configure all pins connected to the trace module to high level , When a black line is detected , The pin will return to the high level
main.c（ Only some key codes are posted ）
else if((XJ1==1&&XJ2==1)&&(XJ3==1&&XJ4==1))// High level detected on all four pins , stop it
Personal summary ：
Before making things , Be sure to check the function introduction and usage of various modules .（ Xiaobai, I bought two different modules , The result is that the program can not run smoothly , It took a lot of time to modify , Finally, I was forced to check the user manual of the module ） secondly , We must insist , Confusion of ideas （ Especially for beginners like Xiaobai ） be not afraid of , The biggest fear is not to solve it , You can do something that has nothing to do with electronics , I'll come back later to think again . also , Make use of it MDK Software simulation function of . Finally, be good at rewriting the program , How to make the program more efficient , How to rewrite a part of your project online .
I made a promise for ten years , Just for the most beautiful meeting .
I'm a Siberian cockroach , friend , See you next time .