Pages: [1]   Go Down
Author Topic: Firmata and PWM  (Read 770 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino'll never stop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino'll never stop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And could never be, i guess, as pin0 ?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The PWM pins are labeled on the Arduino board with a little squiggly line beside the pin number.
Not on a Mega.  smiley-cool
Logged

Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: