-
Notifications
You must be signed in to change notification settings - Fork 0
Integration
Syed Yead Zaman edited this page Mar 10, 2025
·
6 revisions
Connect the HC-SR04 Ultrasonic Sensor to the STM32F401RE microcontroller as follows:
- VCC to 5V
- Trig to PA8 (D7) Pin (timer 1 - one pulse mode PWM generation)
- Echo to PC1 (A1) Pin (timer 5- input capture time)
- GND to GND
Then you can use the ultrasonic.h library to interface with it.
Connect the 28BYJ-48 Stepper Motor to the ULN2003 Driver and then connect the driver to the STM32F401RE microcontroller as follows:
- IN1 to PC0 (A5) Pin
- IN2 to PC1 (A4) Pin
- IN3 to PB0 (A3) Pin
- IN4 to PA4 (A2) Pin
- VCC to 5V
- GND to GND
Then you can use the stepper.h library to control the stepper motor.