By now you should know How to post code properly. Read it. Do it.
It is also a bit of a mystery how you could think that a question about bandpass filter code belonged in the Website and Forum group.
static void filterloop()
 { for (;;)
   { xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; xv[4] = xv[5]; xv[5] = xv[6]; xv[6] = xv[7]; xv[7] = xv[8]; xv[8] = xv[9]; xv[9] = xv[10]; xv[10] = xv[11]; xv[11] = xv[12]; xv[12] = xv[13]; xv[13] = xv[14]; xv[14] = xv[15]; xv[15] = xv[16];
    xv[16] = next input value / GAIN;
    yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; yv[4] = yv[5]; yv[5] = yv[6]; yv[6] = yv[7]; yv[7] = yv[8]; yv[8] = yv[9]; yv[9] = yv[10]; yv[10] = yv[11]; yv[11] = yv[12]; yv[12] = yv[13]; yv[13] = yv[14]; yv[14] = yv[15]; yv[15] = yv[16];
That is the stupidest looking mess I've seen today.
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
You obviously know about for loops, so why the hell aren't you using them?
(-107.3207528700 * yv[14]) + ( 15.0671455990 * yv[15]);
next output value = yv[16];
}
}
couple of things:
you may want to change "#define GAIN 2.733054109e+10" to "const double GAIN 2.733054109e+10"
//double - >8 byte -> 2.3E-308 to 1.7E+308 ->15 decimal places
//define is usually 2 bytes long max value of 65 535 (unsigned)
secondly, I'm assuming that "next input value" will be be likely a analog read.
so ignoring PaulS not so helpful comment, you can implement this code as follows for in arduino sketch:
void setup(){
// initailise you inputs/ serial comms etc
}
void loop(){
//put the content of the for loop here. replace "next input value" with analogRead(1) for example if you a reading from A1 (assuming arduino UNO here)
}
Also may be sensible to put all the decimal constants you are using as const double global variables (just in case the complier does something funny with them)
sherzaad:
you may want to define "#define GAIN 2.733054109e+10" as follows:
#define GAIN 2.733054109e+10UL //unsigned long. define generally holds a int value. GAIN is obviously is greater than the largest value an int can hold 65 535!
GAIN is also larger than can be held in a 32 bit UL !!!
sherzaad:
couple of things:
you may want to change "#define GAIN 2.733054109e+10" to "const double GAIN 2.733054109e+10"
//double - >8 byte -> 2.3E-308 to 1.7E+308 ->15 decimal places
//define is usually 2 bytes long max value of 65 535 (unsigned)
secondly, I'm assuming that "next input value" will be be likely a analog read.
so ignoring PaulS not so helpful comment, you can implement this code as follows for in arduino sketch:
void setup(){
// initailise you inputs/ serial comms etc
}
void loop(){
//put the content of the for loop here. replace "next input value" with analogRead(1) for example if you a reading from A1 (assuming arduino UNO here)
}
Also may be sensible to put all the decimal constants you are using as const double global variables (just in case the complier does something funny with them)
put the content of the for loop here - This is my problem - how to create it ?
Ted, sorry for the stupid question, but have you used the arduino IDE before?
Looking at your last post I've got a feeling that you know programming but not how to use the arduino IDE.
Also you should look at the examples for how to used the IOs on your arduino board. what IO are you referring to with "1"
in the code you posted the for loop is the infinite loop. did you try putting the contents of the for loop in to void loop routine(that's your infinite loop in the IDE)? (I assume yes and that's wen you got those errors)
one more thing, how do you want to view the output of your bandpass filter? Serial monitor? an output to another IO?
lastly to be clear, you ARE trying to code using Arduino IDE?
../Src/main.c(64): error: #20: identifier "next" is undefined
next output value = yv[16];
../Src/main.c(64): error: #65: expected a ";"
next output value = yv[16];
../Src/main.c(49): warning: #177-D: function "filterloop" was declared but never referenced
../Src/main.c(64): error: #20: identifier "next" is undefined
next output value = yv[16];
../Src/main.c(64): error: #65: expected a ";"
next output value = yv[16];
../Src/main.c(49): warning: #177-D: function "filterloop" was declared but never referenced
try changing "next output value" to next_output_value. It might compile but I don't expect the to see anything as this is a dummy input
I had some time so I tried your code in Arduino IDE and it compiled!
#define NZEROS 16
#define NPOLES 16
const double GAIN = 2.733054109e+10;
const double A = -0.9999996903;
const double B = 15.0671415160;
const double C = -107.3207279400;
const double D = 479.5899447000;
const double E = -1504.6930028000;
const double F = 3514.0764694000;
const double G = -6318.5794832000;
const double H = 8922.2254164000;
const double I = -9998.7316198000;
const double J = 8922.2257618000;
const double K = -6318.5799724000;
const double L = 3514.0768775000;
const double M = -1504.6932358000;
const double N = 479.5900375300;
const double P = -107.3207528700;
const double Q = 15.0671455990;
double xv[NZEROS + 1], yv[NPOLES + 1];
void setup() {
 // put your setup code here, to run once:
}
void loop() {
 double Next_Input_Value, Next_Output_Value;
 xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; xv[4] = xv[5]; xv[5] = xv[6]; xv[6] = xv[7]; xv[7] = xv[8]; xv[8] = xv[9]; xv[9] = xv[10]; xv[10] = xv[11]; xv[11] = xv[12]; xv[12] = xv[13]; xv[13] = xv[14]; xv[14] = xv[15]; xv[15] = xv[16];
 xv[16] = Next_Input_Value / GAIN;
 yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; yv[4] = yv[5]; yv[5] = yv[6]; yv[6] = yv[7]; yv[7] = yv[8]; yv[8] = yv[9]; yv[9] = yv[10]; yv[10] = yv[11]; yv[11] = yv[12]; yv[12] = yv[13]; yv[13] = yv[14]; yv[14] = yv[15]; yv[15] = yv[16];
 yv[16] = (xv[0] + xv[16]) - 8 * (xv[2] + xv[14]) + 28 * (xv[4] + xv[12])
      - 56 * (xv[6] + xv[10]) + 70 * xv[8]
      + ( A * yv[0]) + ( B * yv[1])
      + (C * yv[2]) + (D * yv[3])
      + (E * yv[4]) + (F * yv[5])
      + (G * yv[6]) + (H * yv[7])
      + (I * yv[8]) + (J * yv[9])
      + (K * yv[10]) + (L * yv[11])
      + (M * yv[12]) + (N * yv[13])
      + (P * yv[14]) + ( Q * yv[15]);
 Next_Output_Value = yv[16];
}
As I said before, don't expect to see anything as Next_Input_Value and Next_Output_Value are both internal variables. Once you decide what your input and output are gonna be subtitute those variables for them
You will also need to know your sampling rate (how often to read your input in the loop)