BBB ADC automatically Stopping 1007 sample after.

55 views
Skip to first unread message

Desperado

unread,
Apr 7, 2014, 7:09:10 AM4/7/14
to beagl...@googlegroups.com
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++));
    }

}

ashwin.s...@gmail.com

unread,
Aug 6, 2014, 7:28:53 AM8/6/14
to beagl...@googlegroups.com
Hi,

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

Thanks,
Ashwin
Reply all
Reply to author
Forward
0 new messages