Can somebody explain how can I connect a HC-SR04 sensor with a vibration motor 1027 3V?
To what? If Arduino, which Arduino?
Arduino UNO, working with Starter KIT RFID V1
I would use the "NewPing" library for the HC-SR04.
https://reference.arduino.cc/reference/en/libraries/newping/
But the UNO output pins cannot directly drive the motor. You will need a separate 3.3 volt supply for the motor, a transistor such as P2N2222 and a diode (1N4004).
https://www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf
https://cdn-shop.adafruit.com/datasheets/1N4001-D.PDF
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.