From be3d848c7dec2b42e5fe875a87be361c3ad36816 Mon Sep 17 00:00:00 2001 From: burg Date: Mon, 2 May 2005 00:34:10 +0000 Subject: adc marche ascenseur marche ventouse marche tourelle ??? --- n/es/src/Makefile | 2 +- n/es/src/capteurf.c | 2 ++ n/es/src/main.c | 5 ++++- n/es/src/tourelle.c | 2 -- 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