// Inspiration for the correct dividers: https://www.engineersgarage.com/knowledge_share/generating-variable-frequency-with-arduino/
// Engineers Garage
#define PWM_OUTPUT1 9
#define PWM_OUTPUT2 3
#define FREQ_DIV 10000
void setup()
{
pinMode(PWM_OUTPUT1, OUTPUT);//Pwm pin as Output
TCCR1A=_BV(COM1A1)|_BV(COM1B1);//Non-inverted Mode
TCCR1B=_BV(WGM13)|_BV(CS11);//Prescalar 8
ICR1 = FREQ_DIV;
OCR1A = int (FREQ_DIV/2); // duty cycle
}
void loop(){
// do nothing.
// Delay as long as the delay allows.
// https://www.arduino.cc/reference/en/language/variables/data-types/unsignedlong/
delay((2^32 - 1));
}