Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vinhx opened this issue Feb 26, 2024 · 2 comments
Open

Comments

@vinhx
Copy link

vinhx commented Feb 26, 2024

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
Copy link

rengels commented Feb 26, 2024

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
Copy link
Author

vinhx commented Feb 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants