/*
- * Copyright (C) 2012-2013 Czech Technical University in Prague
+ * Copyright (C) 2012-2015 Czech Technical University in Prague
*
* Created on: 28.2.2013
*
static double lsb2volts(unsigned lsb)
{
- return ((double)lsb + 0.0)*2.5/4095*10;
+ return ((double)lsb + 0.0)*2.5/4095*2;
}
int i;
rpp_sci_printf("ADC Inputs Test [0-15]:\r\n");
- rpp_sci_printf("=======================================================================\r\n");
+ rpp_sci_printf("===============================================================================================\r\n");
for (i = 0; i < 16; i++)
rpp_sci_printf("%5d ", i);
rpp_sci_printf("\n");
- for (i = 1; i < 13; i++)
- rpp_sci_printf("%5d ", i);
- rpp_sci_printf("\n");
-
// Calculate wait time in OS ticks
static const portTickType freq_ticks = 100 /* ms */ / portTICK_RATE_MS;
portTickType last_wake_time = xTaskGetTickCount();
while (cmd_io->getc(cmd_io) < 0) {
+ // Update inputs
+ rpp_adc_update();
for (i = 0; i < 16; i++)
rpp_sci_printf("%5d ", rpp_adc_get(i+1));