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.
Dependencies: mbed
Revision 0:0e564d96cb09, committed 2015-11-05
- Comitter:
- constantine8425
- Date:
- Thu Nov 05 15:07:26 2015 +0000
- Commit message:
- sifax test
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Man_Barre.cpp Thu Nov 05 15:07:26 2015 +0000 @@ -0,0 +1,43 @@ + +#include "Man_Barre.h" + + + + + +void Init_GPIO ( void ) + +{ + + + + + bled1=0; + bled2=0; + bled3=0; + + + } + + + +void Barre ( void ) +{ +switch ( compteur ){ + case 0: bled1=1; break; //display 0 + case 1: bled2=1; break; //display 1 + case 2: bled3=1; break; + + +} + +compteur=compteur+1; + +if (compteur>2) +{ +compteur=0; + +} + +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Man_Barre.h Thu Nov 05 15:07:26 2015 +0000 @@ -0,0 +1,45 @@ +/******************************************************************************/ +/* @F_NAME : Progression_SYS */ +/* @F_PURPOSE : mbed system */ +/* @F_CREATED_BY : Djouama Karim */ +/* @F_CREATION_DATE : 05/11/2015 */ +/* @F_LANGUAGE : C /cpp */ +/* @F_MPROC_TYPE: */ +/*********************************** (C) Copyright 2014 KSYS ***/ + + +#ifndef Man_Barre_H +#define Man_Barre_H + +/*______ I N C L U D E - F I L E S ___________________________________________*/ + +#include "mbed.h" + + + +DigitalOut bled1(LED1); +DigitalOut bled2(LED2); +DigitalOut bled3(LED3); +DigitalIn button(p5); +/*______ G L O B A L - D E F I N E S _________________________________________*/ + +/*______ G L O B A L - T Y P E S _____________________________________________*/ +int compteur =0; + + +void Init_GPIO ( void ); + + + +void Barre ( void ); + +/*______ G L O B A L - D A T A _______________________________________________*/ + +/*______ G L O B A L - M A C R O S ___________________________________________*/ + + + + + +#endif /*DRIVE_Man_Barre_H*/ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 05 15:07:26 2015 +0000 @@ -0,0 +1,23 @@ + +#include "mbed.h" +#include "Man_Barre.h" + + +int main() { + +Init_GPIO ( ); + +while(1) { + + if (button) + + { + Barre ( ); + wait(0.2); + } + + } + + + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 05 15:07:26 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11 \ No newline at end of file