Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of kl46z_btn_slider_toSerial by
main.cpp
- Committer:
- scohennm
- Date:
- 2014-08-14
- Revision:
- 0:e23fffd4b9a7
- Child:
- 1:2688f68df85d
File content as of revision 0:e23fffd4b9a7:
#include "mbed.h"
#define LEDON false
#define LEDOFF true
// slightly more interesting blinky 140814 sc
float blinks[]={0.200, 0.700};
int ledState = LEDON;
DigitalOut greenColor(LED_GREEN);
DigitalOut redColor(LED_RED);
int main() {
while(true) {
ledState = !ledState; // Flip the general state
redColor = ledState;
greenColor = !ledState;// flip state but don't store it.
wait(blinks[ledState]);
}
}
