Re: c code
With this expression your code will only multiply 1's and 0's with 0.0196, and will give 0 or 0.0196. 0.0196 will be translated to type of c that is (i suppose) unsigned char and you'll always have 0 as result.
First you have to translate input 1's and 0's to decimal number and than you can multiply it with 0.0196.
This way if you have 1,0,0,1,0,1,1,1 you must translate it to c=10010111 and later you can multiply it with 0.0196, but first you must make typecast of c that now is char, to float:
unsigned char c;
float m;
m=(float) c;
m=m * 0.0196;