Time is good

Dependencies:   RoboClaw mbed

Fork of Robot2016_2-0 by ARES

Committer:
IceTeam
Date:
Fri May 06 09:20:49 2016 +0200
Revision:
83:714fa414b2bf
Child:
84:b54822c913b0
Rajout gestion des couleurs

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IceTeam 83:714fa414b2bf 1 #include "entete.h"
IceTeam 83:714fa414b2bf 2
IceTeam 83:714fa414b2bf 3 void changeCamp(void)
IceTeam 83:714fa414b2bf 4 {
IceTeam 83:714fa414b2bf 5 if(SCouleur==VERT) {
IceTeam 83:714fa414b2bf 6 SCouleur = VIOLET;
IceTeam 83:714fa414b2bf 7 LEDR = 1;
IceTeam 83:714fa414b2bf 8 LEDV = 0;
IceTeam 83:714fa414b2bf 9 } if (SCouleur == VIOLET) {
IceTeam 83:714fa414b2bf 10 SCouleur = NOIR;
IceTeam 83:714fa414b2bf 11 LEDV = 0;
IceTeam 83:714fa414b2bf 12 LEDR = 0;
IceTeam 83:714fa414b2bf 13 }
IceTeam 83:714fa414b2bf 14 else {
IceTeam 83:714fa414b2bf 15 SCouleur = NOIR;
IceTeam 83:714fa414b2bf 16 LEDV = 1;
IceTeam 83:714fa414b2bf 17 LEDR = 0;
IceTeam 83:714fa414b2bf 18 }
IceTeam 83:714fa414b2bf 19 }
IceTeam 83:714fa414b2bf 20
IceTeam 83:714fa414b2bf 21 void depart(void)
IceTeam 83:714fa414b2bf 22 {
IceTeam 83:714fa414b2bf 23 while(button==1) {
IceTeam 83:714fa414b2bf 24 if(CAMP==0) {
IceTeam 83:714fa414b2bf 25 changeCamp();
IceTeam 83:714fa414b2bf 26 }
IceTeam 83:714fa414b2bf 27 wait_ms(100);
IceTeam 83:714fa414b2bf 28 }
IceTeam 83:714fa414b2bf 29 }