Hi,
Please correct me if I'm wrong, but this is my understanding with a 3.14.x
or newer kernel:
Since it looks like you want continuous sampling you might want to use the
hardware buffer in iio.
Normally you would use something like the generic_buffer.c [1] as a sample
application, but the eve
From: Rafael Vega
Reply-To:
Date: Saturday, May 24, 2014 at 1:23 AM
To:
Subject: [beagleboard] Reading analog inputs fast in beaglebone black
>
>
> I need to read all 7 analog pins in the BBB every 5 milliseconds. I'm doing so
> with the following C code:
> voi
From: Rafael Vega
Reply-To:
Date: Saturday, May 24, 2014 at 1:23 AM
To:
Subject: [beagleboard] Reading analog inputs fast in beaglebone black
>
>
> I need to read all 7 analog pins in the BBB every 5 milliseconds. I'm doing so
> with the following C code:
> voi
Christian is correct. Don't use printf. It introduces a significant
overhead.
remove printf, copy into a variable. Then check and see if you can meet
timing. *fingers crossed*
Your email mentioned you wanted to acquire all 7 analog inputs for real
time audio every 5ms.
Depending on your level o
>
> I would replace "printf("0 %li\n", value_int); fflush(stdout);" by
> saving the converted values into an array, and print the values only
> when the measurement ist finished.
>
What do you mean when the measurement is finished? I need to read the
inputs every 5 milliseconds forever. Is th
I need to read all 7 analog pins in the BBB every 5 milliseconds. I'm
doing so with the following C code:
...
while(1){
fread(&value_str, 6, 6, f0);
value_int = strtol(value_str,NULL,0);
printf("0 %li\n", value_int);
fflush(stdout);
I need to read all 7 analog pins in the BBB every 5 milliseconds. I'm doing
so with the following C code:
void main(){
char value_str[7];
long int value_int = 0;
FILE* f0 = fopen("/sys/bus/iio/devices/iio:device0/in_voltage0_raw", "r");
while(1){
fread(&value_str,