Deodorant dispenser can be converted into a linear actuator with the help of arduino micro controller.
The design in my video is not so good, and it can be largely improved with proper base and holder. However, it served my tiny purpose. I feel its worth sharing.
Arduino Micro controller
Servo motor and some jumper cables.
Any oscillating servo motor program will be able to work for it. (several able when googled)
Hopefully, this will be helpful for some people.