Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

No PWM on Feather Huzzah?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

No PWM on Feather Huzzah?

by Kokodoko on Thu Feb 13, 2020 11:20 am

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 | TOGGLE FULL SIZE
void setup() {
  pinMode(15, OUTPUT);
}

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


Thanks!

Erik.

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

Re: No PWM on Feather Huzzah?

by kcl1s on Thu Feb 13, 2020 11:39 am

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-basics-analog-output?view=all

Fellow hobbyist
Keith

kcl1s
 
Posts: 1511
Joined: Tue Aug 30, 2016 12:06 pm

Re: No PWM on Feather Huzzah?

by Kokodoko on Fri Feb 14, 2020 7:36 am

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

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

Please be positive and constructive with your questions and comments.