Home > other >  How to use STM32 drive 3 HC - SR04 ultrasonic module
How to use STM32 drive 3 HC - SR04 ultrasonic module

Time:09-27

Hand useful STM32F103RCT6 and 3 HC - SR04 ultrasonic module, want to distance of three direction, how to write in the program, what is thinking

CodePudding user response:

1. Three are put in a cycle, the disadvantage is that each time from the beginning scan
2. Each in their respective interrupt, so that you can avoid the shortcoming of 1, but takes up more resources

CodePudding user response:

Ultrasonic ranging module is triggered by high level and high level control to choose which direction can make module, specific how to write a program to look at your requirements

CodePudding user response:

20 points may no one have time to write, take a look at more than 200 points!

CodePudding user response:

In one direction before written test

CodePudding user response:

Every HC - SR04 has a Trig and Echo, Trig test start signal, according to the need to send, after the delay detection wavelength Echo feedback, polling mode can!

CodePudding user response:

reference 1st floor kuangbao9 response:
1. The three are put in a cycle, the disadvantage is that each time from the beginning scan
2. Each in their respective interrupt, so that you can avoid the shortcoming of 1, but takes up more resources

In a cycle will influence each other
  • Related