I’ve been an electronics curious since a child but never got in too deep. I’ve recently bought an Arduino, start playing with it and realised the potential of this device. I started thinking and it would be the perfect solution for a project that I’ve been wanting to do for a long time.


I have a laser that mesures distances with a board which I can make it output a Voltage depending on how far it is from an object, and the final objecting is activating a buzzer whenever in reaches a certain threshold. I was planing on having two different signals for different distances e.g at 5m would start to buzz every half a second in a certain frequency (700Hz) and when it would reach 2m would buzz every 1/8 of a second in the same frequency. Of course the distances in this case would be read as voltages for the arduino.


So far I manage to make the Arduino read the voltage fluctuation and already created a project where I make the buzzer work in diferent timer intervals and frequencies. I’m only missig the code to do everything interact with each other. I’ve been fideling around with it but couldn’t manage to find a solution.


Does anyone would know how could I be able to achieve this amazingly complex engineering project.


Thank you very much for your help