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.
Diff: main.c
- Revision:
- 0:748338cb3553
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.c Fri Dec 17 22:19:04 2010 +0000 @@ -0,0 +1,71 @@ +/* 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; +};