From: Nathael Pajani Date: Tue, 17 May 2016 14:01:25 +0000 (+0200) Subject: Make continuous ADC conversion in background X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=79b4eb454629c13c3a66a87d14f523132be7b34c;p=soft%2Fperso%2Fcpe Make continuous ADC conversion in background --- diff --git a/cape_rccar/main.c b/cape_rccar/main.c index 6b3a419..0ed4b66 100644 --- a/cape_rccar/main.c +++ b/cape_rccar/main.c @@ -613,6 +613,9 @@ int main(void) /* Ultrasonic distance sensors */ ultrasound_sensors_config(UART_DEBUG); + /* Smoke sensor and ADCs */ + adc_start_burst_conversion(LPC_ADC_CHANNEL(ADC_SMOKE) | LPC_ADC_CHANNEL(ADC_VBAT1) | LPC_ADC_CHANNEL(ADC_VBAT2)); + /* Servo motors */ msleep(2000); servo_config(UART_DEBUG); @@ -626,8 +629,6 @@ int main(void) /* Request a Temp conversion on I2C TMP101 temperature sensor */ tmp101_sensor_start_conversion(&tmp101_sensor); /* A conversion takes about 40ms */ - /* Start ADC conversions to get voltages */ - adc_start_convertion_once(ADC_SMOKE, 0); /* Tell we are alive :) */ chenillard(250);