I'm building my project which uses 5 ultrasonic sensors and 5 vibration motors running on Arduino UNO clone. And as everyone knows, the ultrasonic sensors are connected to the digital pins in the UNO, where 5 sensors requiring 2 pins each, hence 10 pins usage, which leaves me no options but to use the analog pin as output. No problem so far, since I can use the analog pin to control a transistor to control the vibration motors.
But what I'm trying to achieve is the ability to change the vibrations of the motors through PWM. How can I output PWM signal to the transistors from the analog pins, since I've run out of digital pins?
Thank you very much.
PS: Buying another board is not an options for me, nor buying ANY other components, as I don't have instant access to electronic shops here in Malaysia.