TheDIYGuy999 / Rc_Engine_Sound_ESP32

Allows to play vehicle engine sounds on an ESP32. Additional sounds can play in parallel with the engine sound! Controls your lights as well. compatible with SBUS, IBUS, PWM, PPM and SUMD signals.
https://www.youtube.com/watch?v=s93yAAmEtbM&t=3s
298 stars 119 forks source link

Engine sound controlled by Analog input horn controlled by digital input #68

Open vinhx opened 7 months ago

vinhx commented 7 months ago

Hello sir, your project so great! I'm currently making an 3 wheels electric bike for my children. that the motor speed controlled by a hall sensor , the signal output is analog 0 to 5v. My idea is use the analog input on esp32 to control engine sound, the horn controlled by digital input pin. Could you please give me advice how to get only those 2 function from whole project thank you alot for all your great work and kindly sharing!!!

Best regard!

rengels commented 7 months ago

Thanks for the praise,

The SW isn't really that modular. If you are fit in programming, you can replace the pwm input functions by something else.

An other solution would be to convert your 0-5v signal and the horn switch to PWM signals via an external (small) arduino. Here is something that I found: https://forum.arduino.cc/t/creating-your-own-pwm-to-control-a-servo/129869

Good luck

vinhx commented 7 months ago

oh, I got your point! I will try to replace the PWM signal by data mapping from analog input, thank you alot!