Wijnand Nijs / Mbed 2 deprecated FMEV_heartbeat-0

Dependencies:   mbed

main.c

Committer:
Wijnand
Date:
2010-12-17
Revision:
0:748338cb3553

File content as of revision 0:748338cb3553:

/* This file has been prepared for Doxygen **************************/

/*! \file main.c *****************************************************
*
* \brief Test program for the compiler chain and the the mbed NXP
* LPC1768 target.
*
* Uses the module: delay.
*
* Copyright (C) 2008 W.Nijs (ALF4all)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
* \author	W.Nijs.
* \date		12/03/2009
* \version	1.0 12/03/2009, initial revision.
* \version	2.0 28/05/2010, prepared for Doxygen.
*
*********************************************************************/

/*****************************************************************//**
* Include section
*  Add all #includes here
*********************************************************************/

#include "mbed.h"
#include "delay.h"


/*****************************************************************//**
* \brief	main
*
* Testprogram heartbeat-0, using LED1.
*
* \author	W.Nijs.
* \date		28-05-2010
*********************************************************************/

DigitalOut heartbeat(LED1);

int main() {
    int i = 0;

    while (1) {
        if ((i==0)||(i==3)) {
            heartbeat = 1;
        } else {
            heartbeat = 0;
        };
        if (i>=9) {
            i = 0;
        } else {
            i++;
        };

        delay(100);
    };

    return 0;
};