Neyolight
Full Member level 5
Hi all
I am looking to extract the gradient of my sensor data I capture (real time). Im not sure how to do that.
Lets say the sensor plots a "V" shaped graph in response of an external stimulus ( Please see the image). All I need to do is capture X1, Y1 and X2 and Y2 (please see the image) . But im unsure how to do that.
To add to my problem, the sensor reading vary within 10 points (bug in code maybe or something). So if the sensor is suppose to give an output of 100, the actual output (on UART) will vary between 95-105. So im not sure how to go about capturing the gradient.
Im coding in C, over MPLAB and using PIC18 micro.
Thanks
---------- Post added at 17:13 ---------- Previous post was at 17:11 ----------
Also Im capturing my sensor output every 81 ms .
I am looking to extract the gradient of my sensor data I capture (real time). Im not sure how to do that.
Lets say the sensor plots a "V" shaped graph in response of an external stimulus ( Please see the image). All I need to do is capture X1, Y1 and X2 and Y2 (please see the image) . But im unsure how to do that.
To add to my problem, the sensor reading vary within 10 points (bug in code maybe or something). So if the sensor is suppose to give an output of 100, the actual output (on UART) will vary between 95-105. So im not sure how to go about capturing the gradient.
Im coding in C, over MPLAB and using PIC18 micro.
Thanks
---------- Post added at 17:13 ---------- Previous post was at 17:11 ----------
Also Im capturing my sensor output every 81 ms .