Hi Erik-
Thanks for your reply.
I compiled a very simple code using mbed compiler...
include "mbed.h"
int main() {
DigitalOut led(LED_RED);
while (true) {
led = 0; // Off
wait(2);
led = 1; // on
wait(2);
}
}
so after compiling this code I got the output as tricolor led flashing red for 2 ms.so I changed the digitalout led as green and blue(as LED_RED,LED_BLUE) so it displayed corresponding colors.
Next I thought of flasing all the three colors one by one for that I wrote the code as
#include "mbed.h"
int main() {
DigitalOut led1(LED_RED);
DigitalOut led2(LED_BLUE);
DigitalOut led3(LED_GREEN);
while (true) {
led1 = 0; // Off
wait(60);
led1 = 1; // on
wait(60);
led2 = 0; // Off
wait(60);
led2 = 1; // on
wait(60);
led3 = 0; // Off
wait(60);
led3 = 1; // on
wait(60);
}
}
But I am not getting the colors flashing one by one I think it is flashing all at once... I changed the wait sec as continous too...(like (60,120,180 and so on) and I also tried like this... while flashing red led, I even assigned one(it means off rt?) for the rest of the led variables.
I don't know where I am doing mistake.. If possible can you please help me with this issue.. Thanks a lot.
Regards
BP.
Hi I am new to embedded and new to programming FRDM-Kl25z and I have to do a simple project using FRDM-Kl25z. Can anyone please let me know which textbook can i refer to gain knowledge about basics for programming this device quickly and start trying out sample programs. Thanks.