Firmata and PWM

Hi,

I have a (simple ?) question : how can i set all pwm pins in pwm outputs ?

I control my arduino Mega from an application and can not send pwm on pin 1,2.
It seems to be something in firmata, but is there an existing firmata to free pin 1 and 2 for pwm ?

Cheers.

Sebastien

Pin 1 is the Serial pin. It is not a PWM pin.

And could never be, i guess, as pin0 ?

And could never be, i guess, as pin0 ?

I'm not sure what that means. Pins 0 and 1 are the hardware serial pins that Firmata uses to talk to the PC or other device driving it.

They are not PWM pins in any case.

Pins 0 and 1 are the hardware serial pins that Firmata uses to talk to the PC or other device driving it.

That's right. There are only a certain amount of pins that are PWM capable. That's because the timers that have the PWM module have certain pins assigned to them (you will find those pins in the datasheet labeled, for example, OCR0A).

The PWM pins are labeled on the Arduino board with a little squiggly line beside the pin number.

The PWM pins are labeled on the Arduino board with a little squiggly line beside the pin number.

Not on a Mega. 8)

Yeah you’re right. I see it’s pins 2-13 only. http://arduino.cc/en/Reference/AnalogWrite