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.
8 years, 7 months ago.
Blink/Unblink
Hello this is the simple code for blinking
- include "mbed.h"
DigitalOut myled(LED1); original DigitalOut myled(D6); modified
int main() { while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); } }
I want to make it blink when 1 pressed the pushbutton and make it stop blinking and turns off when pressed again and blink again when pressed... How do I make this cycle happens please help