6 years, 10 months ago.

Hello World causes all LEDs to come on.

When I run Hello World, instead of one led blinking, one led turns on and stays on, after a bit, the neighbor led turns on and stays on, after a bit the next neighbor led turns on and stays on, finally after a bit, the fourth led turns on and they all stay on.

Whats up with this?

1 Answer

6 years, 10 months ago.

Have you have used the standard code below?

It only uses one LED (LED1), that should flash and the others should not light at all.

Make sure you have the latest Mbed.h loaded. Click on the mbed folder in your program workspace and check on the library build details to see if update icon is highlighted.

Hello World

#include "mbed.h"
DigitalOut myled(LED1);
int main() {
    while(1) {
        myled = 1;
        myled = 0;

I used the standard code. Does "compiling" automatically flash the code onto the mbed? Am I missing a step?

posted by Philip D Olivier 12 Aug 2014

When you compile, you should get a windows dialogue at the bottom of your screen asking 'do you want to open or save', click on 'save as' then click 'Mbed' on 'your computer'. The LED will flash on the mbed indicating the code is being transferred, when this stops, press the mbed reset button then the program will run.

posted by Paul Staron 12 Aug 2014