simple LED program works only once....Second time it doesnt work

09 Sep 2015
  1. include "mbed.h" Serial pc(USBTX, USBRX); tx, rx DigitalOut myled(LED1); DigitalOut P3(PTE4); int main() { P3=0; while(P3=0) { myled=1; pc.printf("Hello World!\n");

} }

works in other system...but not in mine

09 Sep 2015

Please use <<code>> and <</code>> when posting code, it stops the formatting getting messed up.

What do you mean it only works once? It only prints "Hello world" once?

It should be while(P3==0) not while(P3=0), you want to check the state of P3 not set it.