LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM with variable frequency

Solved!
Go to solution

Hi Nathan,

8. Apr 9, 2014 7:01 PM (in response to maudTU)

  Correct AnswerRe: PWM with variable frequency     

I created a custom LIFA function based on your Arduino code.  I made some assumptions since I did not have that include file (I was also unable to compile for the same reason).

Take a look at the code to see if my assumptions were correctly.  Let me know if it works.

Attachments:

This looks like it would solve my PWM frequency control problem but when I upload LIFA_Base I get the following errors:

LabVIEWInterface.ino: In function 'bool set_pwm_freqency(char, int, char)':

LabVIEWInterface:887: error: 'SetPinFrequencySafe' was not declared in this scope

LabVIEWInterface:890: error: 'pwmWrite' was not declared in this scope

I'm new at this so I'm probably doing something wrong. Any idea what's causing these errors?

0 Kudos
Message 21 of 23
(1,770 Views)

It looks like you need to get the PWM.h library.  I'm not sure if I ever had it and was just basing my code on what maudTU posted.

0 Kudos
Message 22 of 23
(1,770 Views)

Thanks! I'll install the library and give it a try.

0 Kudos
Message 23 of 23
(1,770 Views)