One thing that did cross my mind earlier. I seemingly forgot to post.

First, try running time ./test with sudo so...

$ sudo time ./test

If this works, then it's a permission issue. I really do not think this is
the problem, but it possibly could be.

Second, change:

> void read_adc(int fd)
> {
>         char adc[5] = {0};
>         int len = read(fd, adc, sizeof(adc - 1));
>         adc[len] ='\0';
>         printf("%s ", adc);
> }
>

To
void read_adc(int fd)
{
        char adc[5] = {0};
        int len = read(fd, adc, sizeof(adc - 1));
        if(len == -1){
            printf("error: %s\n", strerror(errno));
                exit(1);
        }
        else if(len == 0){
            printf("%s\n", "buffer is empty");
        }
        else{
            adc[len] ='\0';
            printf("%s ", adc);
        }
}

What this does is give us more error control, and possibly a clue as to the
problem with this executable on your system. If there is an error the
program will exit, and give you the reason why. If the buffer in empty,
this possibly means you're running in continuous mode, and these pseudo
files are empty( unused ). I'm thinking one of these two should be the
output you'll get. If not, then I'd have to do more reading to find out
exactly why, but.

If you have a spare sdcard, and install the same image you have now on it.
Well flash from the standalone command line image for 3.8.x. Then follow
the guide I put up on updating device tree files, including upgrading the
kernel to the one I've shown. That would be great. As it would allow you to
keep your older image too just in case this does not work out for you. Or
if you have a Linux system, you could use dd or tar to backup the rootfs,
save it, and then wipe the sdcard you do have clean. And start fresh. It
could be that libpruio is somehow involved in that code not working
properly.

On Wed, Sep 30, 2015 at 12:30 AM, William Hermans <[email protected]> wrote:

> Modified sine or true sine ?
>
> On Wed, Sep 30, 2015 at 12:16 AM, Rathin Dholakia <
> [email protected]> wrote:
>
>>
>>
>> On Wednesday, September 30, 2015 at 12:37:55 PM UTC+5:30, William Hermans
>> wrote:
>>>
>>> Oh, I probably forgot the most important part. Never stop learning. For
>>> me I love learning, maybe even more than actually getting anything done heh.
>>>
>>>
>> Oh yes, I also LOVE learning.. Thats why I have taken this project.
>> Actually I am from electrical background, Power system to be precise, but
>> thought of taking a walk on wild side ;) though feeling the heat but,
>> yeah....
>>
>> I liked your casual approach, Thank you for the insight..!!
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to