8 years ago.

switch off the LED

Hello,

I want to know if i can switch off one of the LED on the board Nucleo F334R8 ?

Thank You,

Faris

2 Answers

8 years ago.

Faris,

Thanks for the question :)

Which LED on the board are you referring to?

For this board only LD2 is able to be user controlled.

https://www.element14.com/community/dtss-images/uploads/devtool/diagram/large/162e6298d689371cebaf0c1a33ed4dc1.png

You can see that LD1 is for the STLINK, and LD3 is solid RED for power.

Hope that helps.

Regards,

Andrea, team mbed

Accepted Answer

Hi Andrea,

Thanks a lot, you helped me enough :)

Regards,

Faris

posted by Alexandre JAFFRE 27 Oct 2016
8 years ago.

Are you asking for something like this? This is blinky code

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1; // LED is ON
        wait(0.2); // 200 ms
        myled = 0; // LED is OFF
        wait(1.0); // 1 sec
    }
}

Thank you bill ;)

posted by Alexandre JAFFRE 27 Oct 2016