summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
Diffstat (limited to 'n')
-rw-r--r--n/es/src/Makefile2
-rw-r--r--n/es/src/capteurf.c2
-rw-r--r--n/es/src/main.c5
-rw-r--r--n/es/src/tourelle.c2
4 files changed, 7 insertions, 4 deletions
diff --git a/n/es/src/Makefile b/n/es/src/Makefile
index 52bbf48..41cf6b0 100644
--- a/n/es/src/Makefile
+++ b/n/es/src/Makefile
@@ -2,7 +2,7 @@ PROGS = es
es_OBJECTS = main.o rs232.o tourelle.o adc.o twi_slave.o proto.o ascenseur.o capteurf.o
DOC =
EXTRACTDOC =
-MODULES = n/avr/rs232 n/avr/carte_capteur n/avr/utils n/avr/adc n/avr/proto n/avr/twi-slave
+MODULES = n/avr/rs232 n/avr/utils n/avr/adc n/avr/proto n/avr/twi-slave
CONFIGFILE = avrconfig.h
# atmega8, atmega8535, atmega128...
MCU_TARGET = atmega8535
diff --git a/n/es/src/capteurf.c b/n/es/src/capteurf.c
index 1672d45..0aaf2af 100644
--- a/n/es/src/capteurf.c
+++ b/n/es/src/capteurf.c
@@ -35,11 +35,13 @@ void read_capteurf(void )
// Lecture capteur droit
adc_start(CAPTEUR_DROIT);
while (adc_checkf() !=0);
+ delay_us(250L);
capteurf_droit = adc_read();
//Lecture capteur gauche
adc_start(CAPTEUR_GAUCHE);
while (adc_checkf() !=0);
+ delay_us(250L);
capteurf_gauche = adc_read();
}
diff --git a/n/es/src/main.c b/n/es/src/main.c
index f17aa55..7851807 100644
--- a/n/es/src/main.c
+++ b/n/es/src/main.c
@@ -203,6 +203,7 @@ int main (void)
{
adc_start (compteur); // pin selectionnee
while(!adc_checkf()){}
+ delay_us(250L);
stockage_valeur_pont[0][compteur]=adc_read();
}
@@ -240,11 +241,13 @@ int main (void)
adc_start (pin_socle1); // pin socle1 sélectionnée
while(!adc_checkf()){}
+ delay_us(250L);
valeur_socle1 = adc_read();
adc_start (pin_socle2); // pin socle2 sélectionnée
while(!adc_checkf()){}
+ delay_us(250L);
valeur_socle2 = adc_read();
nb_valeur_socle++;
@@ -286,7 +289,7 @@ int main (void)
for(cpt=0;cpt<capteurf_cpt;cpt++)
{
read_capteurf();
- proto_send2w('C',capteurf_droit,capteurf_gauche);
+ proto_send2w('C',capteurf_gauche,capteurf_droit);
}
}
diff --git a/n/es/src/tourelle.c b/n/es/src/tourelle.c
index a904304..6d13e2c 100644
--- a/n/es/src/tourelle.c
+++ b/n/es/src/tourelle.c
@@ -81,8 +81,6 @@ void tourelle_init (uint16_t prescaler)
crenaux(delay,port_tourelle,pin_tourelle); // on met le capteur à 0°
delay_ms(20L);
crenaux(delay,port_tourelle,pin_tourelle); // on met le capteur à 0°
- rs232_putc('C');
-
crenaux(delay,port_tourelle,pin_tourelle); // on met le capteur à 0°
delay_ms(20L);