Mbed Colombia Meetup
/
MBC001-DigitalOut
MBC001 - DigitalOut This example use the DigitalOut function
main.cpp
- Committer:
- leandropg
- Date:
- 2018-05-14
- Revision:
- 0:54f0e2724f0e
File content as of revision 0:54f0e2724f0e:
/** * MBC001 - DigitalOut * This example use the DigitalOut function * 14 May 2018 - Mbed Colombia - http://mbedcolombia.wordpress.com/ * * Board: ST-Nucleo-F446RE - https://os.mbed.com/platforms/ST-Nucleo-F446RE/ * * Copyright [2018] [Leandro Perez Guatibonza / leandropg AT gmail DOT com] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "mbed.h" // LED connected Pin PC_0 DigitalOut led(PC_0); // Main Loop runs in its own thread in the OS int main() { // Inifite Loop while(1) { // LED Turn-On led = 1; // Wait 200 ms wait(0.2); // LED Turn-Off led = 0; // Wait 200 ms wait(0.2); } }