homayoun mh
/
Arduino_Blink
Arduino_Blink sample code ported.
main.cpp
- Committer:
- homayoun
- Date:
- 2014-09-03
- Revision:
- 0:516ad7c37471
File content as of revision 0:516ad7c37471:
#include "mbed.h" DigitalOut myled(LED1); // Instead of "pinMode(led, OUTPUT);" function, this creates an object called "myled", to be used later. // the setup routine runs once when you press reset: void setup() { } // the loop routine runs over and over again forever: void loop() { myled = 1; // Instead of "digitalWrite(led, HIGH);" wait(1.0); // Instead of "delay(1000);" myled = 0; // Instead of "digitalWrite(led, LOW);" wait(1.0); // Instead of "delay(1000);" } int main() { setup(); while(1) loop(); }