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.
9 years, 5 months ago.
DigitalOut
Hi,
I'm completely new to mbed. I have a good bit of programming experience, including using the Arduino IDE, but I'm having some issues with mbed on my F030R8 board using a simple DigitalOut code. When I try to blink D6 (PB_10) using the code below, it doesn't work when compiled for the F030R8 board. (And yes, the LED is attached properly, and I've already updated to the latest firmware on the board).
Code:
blink code
#include "mbed.h" DigitalOut myled(D6); int main() { while(1) { myled = 1; // LED is ON wait(2.5); // 200 ms myled = 0; // LED is OFF wait(2.5); // 1 sec } }
When I compile this same code for my F401RE board, it works just fine. Also, changing the pin to D7 seems to make it work on both boards. I have now tried it on 2 different F030R8 boards, and both behave the same way. I'm sure I'm doing something stupid, so I'd appreciate some help from the experts to get me going in the right direction.
Thanks.
Question relating to:

2 Answers
9 years, 5 months ago.
Hello Agent Orange,
as I see it from sources,
LED1 = PA_5, LED2 = PA_5, LED3 = PA_5, LED4 = PA_5,
Same is for 401 target. Replace D6 by LED1 and see if that works for both platforms.
Regards,
0xc0170
LED is connected to PA_5.