Hi, I am porting some of my code from ESP32 to Argon, and have run into a problem.
My ESP32 code uses the LEDC functions from the Arduino IDE.
specifically:
// declare PWM vars
int FanSpeedPin = D8;
int fanSpeed = 255;
...
// setting PWM properties
int freq = 15000;
int fanChannel = 0;
int resolution = 8;
...
ledcSetup(fanChannel, freq, resolution);
ledcAttachPin(FanSpeedPin, fanChannel);
ledcWrite(fanChannel, fanSpeed);
...
I use these to control the speed of a fan via PWM… these functions sure make it easy.
Is there an equivalent in the Particle cloud IDE?
If not, are there any examples of setting the frequency and duty cycle?
I would like to set the Frequency to 15 kHz, and then be able to change the duty cycle as needed.
Thanks so much for any assistance.