Hi! [email protected] schrieb am Dienstag, 9. März 2021 um 21:15:01 UTC+1:
> Specifically, they are collecting the data using Ring Buffer mode and > saving it to a text file to be processed further for some feature > extraction and further analysis. > > What I'm trying to understand is this: how does Ring Buffer sampling > actually work? As in, if I'm reading data using two analog inputs and > saving it to a text file, what order are the values in? How do I parse them > into meaningful sensor values? I've attached the C code I'm working with, > and greatly appreciate any help or pointers! > Your code doesn't save to a text file. Instead it saves the raw data to a binary file. The unshifted values (0-4095) are stored as 16-bit (unsigned short) binary numbers in the order as captured, like AIN-1, AIN-2, AIN-1, AIN-2, AIN-1, AIN-2, AIN-1, AIN-2, ... In order to parse the file, just read it into a buffer and access that buffer by a unsigned short pointer variable. 0 (null) means 0V, 4095 means 1V8. So multiply the unsigned shorts by the factor 1.8/4095 to get the voltage as a real value. -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/fd15170d-98ce-430a-8d20-34a63fe212b5n%40googlegroups.com.
