Deadp1xels
Well-known member
I know how to design digital filters in Matlab but now I'm looking at using them on my Teensy.
Because I have no access to Matlab at home, for ease of use I used:
http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html
And made a low pass filter to quickly get:
How do I modify this code to filter a specific analog signal?
I want to filter a signal at A1 and then store that new smoother signal in a variable to use but I'm not sure how to utilize this new piece of code
Because I have no access to Matlab at home, for ease of use I used:
http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html
And made a low pass filter to quickly get:
Code:
#define NZEROS 1
#define NPOLES 1
#define GAIN 1.324919696e+00
static float xv[NZEROS+1], yv[NPOLES+1];
static void filterloop()
{ for (;;)
{ xv[0] = xv[1];
xv[1] = next input value / GAIN;
yv[0] = yv[1];
yv[1] = (xv[0] + xv[1])
+ ( -0.5095254495 * yv[0]);
next output value = yv[1];
}
}
How do I modify this code to filter a specific analog signal?
I want to filter a signal at A1 and then store that new smoother signal in a variable to use but I'm not sure how to utilize this new piece of code