No PWM on Feather Huzzah?

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Kokodoko
 
Posts: 32
Joined: Sun Jul 27, 2014 8:50 am

No PWM on Feather Huzzah?

Post by Kokodoko »

I just bought a couple of Feather Huzzah boards for my institution. We want to teach students about connecting to the internet with a microcontroller.

I got the internet connection working, but then I discovered I can't use PWM on the Huzzah board? I tried the following code, but the numbers in analogWrite() are ignored. It seems PWM is not available?

I studied the diagrams of the board but there is no mention of PWM. If the "squiggly lines" mean PWM, then all the GPIO pins should support PWM?
My code:

Code: Select all

void setup() {
  pinMode(15, OUTPUT);
}

void loop() {
  for (int brightness = 0; brightness < 255; brightness++) {
    analogWrite(15, brightness);
    delay(1);
  }
}
Thanks!

Erik.

User avatar
kcl1s
 
Posts: 1512
Joined: Tue Aug 30, 2016 12:06 pm

Re: No PWM on Feather Huzzah?

Post by kcl1s »

All the pins with the sine wave line are PWM capable in this pinout drawing https://learn.adafruit.com/assets/46249 The only difference is pwm is 0 - 1024 compared to 0 - 255 on the Uno. You can see it in use in this guide https://learn.adafruit.com/adafruit-io- ... t?view=all

Fellow hobbyist
Keith

User avatar
Kokodoko
 
Posts: 32
Joined: Sun Jul 27, 2014 8:50 am

Re: No PWM on Feather Huzzah?

Post by Kokodoko »

Thanks! I found the documentation quite sparse and hard to find, but this forum helps !

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”