hexatrik Member Licensed User Longtime User Feb 20, 2019 #1 How do I set PWM Frequency to 2KHz to drive an IGBT in my ARDUINO Mega 2560 Board?
Siam Active Member Licensed User Longtime User Feb 20, 2019 #2 this is my way B4X: sub setpwm dim pwm_freq as int = 100 ' 100hz RunNative ("SetPWMFreq",Null) end sub #If C void SetPWMFreq(B4R::Object* o) { analogWriteFreq(b4r_main::_pwm_freq); } #End If Upvote 0
this is my way B4X: sub setpwm dim pwm_freq as int = 100 ' 100hz RunNative ("SetPWMFreq",Null) end sub #If C void SetPWMFreq(B4R::Object* o) { analogWriteFreq(b4r_main::_pwm_freq); } #End If
hexatrik Member Licensed User Longtime User Feb 21, 2019 #3 Thank you. But how to do this in B4R with out #if C please... Last edited: Feb 21, 2019 Upvote 0
Siam Active Member Licensed User Longtime User Feb 21, 2019 #4 This is for b4r there is no library (so far i know) to change the frequency Upvote 0