Get value from a buffer
I have an ADC input that is read continuously and put in a buffer by the help of DMA. This is my buffer:
uint16_t adc_buf[ADC_BUF_LEN]; //ADC_BUF_LEN = 1
The value in the buffer is replaced continuously by the NEW sampled value from the ADC.
I want to use this value in the buffer, so how can I get out the value. I was thinking something like this:
int value = add_buf[0];
and then I can use the variable "value" for stuff, like printing it to the terminal on my computer or do calculations. But how do I do this? I am not able to print the value to the serial terminal on my computer...


