Hi,
I am creating this subject because I would need the help of people who know how to code ARDUINO. I use a code which allows to control the motors of my SIMU via MotoMonsterShield cards the famous VNH2SP30. The code was written by RacingMat then updated by it to pass the PWM from 580 Hz to 20KHz in order to avoid the unpleasant engine noise on these low frequencies.
However, this reference code is written to drive 2 motors and I use 3 for my SIMU.
For the classic code I was able to transpose it to go from 2 to 3 engines.
By cons concerning the code "ultrasonic" I am not able it requires knowledge that I do not have (my field being the mechanical design).
Obviously it is necessary to intervene on the Timer of the Arduino and following the pins which one wishes to pass to 20KHz it is necessary to modify the timer 0, 1 or 2 ...
If someone can help me it would be very nice of him, and I would not hesitate to return the favor in my area of competence obviously.
I post here the origin of the information and the Arduino codes.
Forum Links:
https://forum.arduino.cc/index.php?topic=135847.30
https://pobot.org/Modifier-la-frequence-d-un-PWM.html
http://www.racingfr.com/forum/…php?showtopic=47537&st=15
The codes :
Basic code 2 engines: https://drive.google.com/open?…_yZX1rz-lY-PTmK5LeYIxeRnb
Code for 3 engines: https://drive.google.com/open?…C2jUUlreRaaVPRkoOlxYMsuVR
Code for 2 PWM 20KHz motors: https://drive.google.com/open?…PofxcrGqS7KObC2sSQScYjRmf