> > *4) I tried with while(1) and it ran perfectly. Now I will try changing to > continuous mode as well as the no of ADC in to the program and will report > back to you..!! * > > *Thanks for the kick start, It is of immense help and yes I have > understood since the beginning that Google is our BEST friend when working > on something new...!! though my results are not as accurate as ur's but > working on it.. :-)* > > *Once again thanks.. will post back my new code, soon.*
If you get continuous mode working I'd be interested in seeing the code. Might even be able to optimize it some for you ;) But I know someone on another forum who is interested in continuous mode. I told him that I am more interested in getting the PRU's involved, but might get around to it someday. I know compared to PRU + ADC it will be slow. *But* if you can get continuous mode working from sysfs, you only need one open(), and close() call for the lifetime of the application for each file path. Which is to say that open(), and close() will no longer have an impact on the application run speed. Then you only need worry about OS latency, and the efficiency of your code . . . You know, a couple friends from different countries, and I have proven that google results vary from country to country. So maybe your results are skewed based on your locale some ? There is a way you can specify which server google uses when you search, but I forget the details. Well, aside from using a web proxy ;) Have fun ! On Sat, Oct 3, 2015 at 1:43 PM, Rathin Dholakia <[email protected]> wrote: > Dear TJF, > > Sorry to bug you with a silly question, I thought being a binary it must > have some specific encoding rel. to library hence I asked it. I didnt knew > it was lack of knowledge. I am sorry...!! > > I Have figured out the way to read binary (code pasted bellow for others;) > but I have a doubt in it that I have lot of Zeros & negative readings as > well > Is it because of my decoding error or is it the samples themselves missing. > > Thanks a ton..!! > > #include<stdio.h> > int main() > { > FILE *fp = NULL; > > short result[100]; > int i; > > fp=fopen("output.0", "w+"); > rewind(fp); > if(fp != NULL) > { > fread(result, sizeof(short), 100 /*# of samples*/, fp); > } > else > return 1; > > printf("Result\n"); > for (i = 0; i < 100; i++) > printf("%d = %d\n", i, (int)result[i]); > > fclose(fp); > return 0; > } > > > > -- > 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.
