BBB ADC automatically Stopping 1007 sample after.

Hi friends,

I read BBB adc value in QT. but read Stopping 1007 sample after. my QT codes below; I do not solve the problem.
please help me.

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
i =0;
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(Read_Analog_Digital_Data()));
timer->start(500);

}

void MainWindow::Read_Analog_Digital_Data()
{

try

{

const char AIN_DEV[] = “/sys/bus/iio/devices/iio:device0/in_voltage0_raw”;
int fd= open(AIN_DEV, O_RDONLY);
char AIN0[5] = {0};
int len8= read(fd, AIN0, sizeof AIN0 -1);
AIN0[len8]=’\0’;
ui->label_9->setText(AIN0);

if(len8>0)
{
ui->P9_42->setText(QString::number(i++));
}

}

Hi,

I too am working on similar project. Can you please tell how you got QT running on BB.

Thanks,
Ashwin