int duty = 25; // duty% 0 to 100
void setup() {
// put your setup code here, to run once:
//Serial.begin(9600);
//Serial.println(map(duty,0,100,0,255));
pinMode(2, OUTPUT);
}
void loop() {
analogWrite(10,map(duty,0,100,0,255)); //output 25% PWM signal of 490 Hz from pin 10(and 3, 9,10,11)
analogWrite(5,map(duty,0,100,0,255)); //output 25% PWM signal of 980 Hz from pin 5 (and 6 only)
}