I created with Arduino Mega PWM 100Hz, now I wonder how can I make sure to vary the duty on automatic serial monitor.
The code that I created is as follows
int outputPsuB = 45; // Timer5-B
//int outputPsuC = 44; // Timer5-C
void setup()
{
pinMode(outputPsuB, OUTPUT); // select Pin as ch-B
//pinMode(outputPsuC, OUTPUT); // select Pin as ch-C
TCCR5A = B00100011; // Phase and frequency correct PWM change at OCRA
TCCR5B = B11010; // prescaler
OCR5A = 20000; // 100Hz se fosse OCR5A = 10000 verrebbe 200hz
OCR5B =2000; // 10%
//OCR5C = 100; // 1%
}
void loop(){}