Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
PWM problem
I am trying to just get an LED to fade and brighten on a LPC11U24 board. I have tried several pwm programs from the cookbook but all that happens is the 4 LED's flash first the 2 outer ones then the 2 inner ones indefinitely. Even with the following program the same thing happens. There are no other programs on the memory card. What am I doing wrong. The basic LED flash program works.
Program:-
- include "mbed.h"
Change brightness of LED using Pwmout function.
/**
- \brief LED to control
- / PwmOut myled(LED1);
/**
- \brief main program
- / int main() {
myled = 0.1;
}
1 Answer
10 years, 10 months ago.
On the LPC11u24 those LEDs are not connected to PWM pins. What you see is the error pattern: It cannot map the pins to a PWM peripheral.