const float frecuencia=30; //Samples per second const int nbits=10; //Bit number const unsigned int nMax= (pow(2,nbits))-1; //Max number of the counter const int sal[nbits]={53,51,49,47,45,43,41,39,37,35}; //Digital outputs //The outputs correspond // sal[0] as MSB ex. for 1001001 the first left to right '1' bit is the MSB // sal[nbit-1] as LSB int cuenta=0; //Real time counter int salida[nbits]={0}; // Variable Real binary counter void setup() { Serial.begin(9600); // Serial for debugging for(int i= 0;i=bitvalue(nbits-i)) // { // salida[i]=1; // c=c-bitvalue(nbits-i); // } else // salida[i]=0; // } for(int i=0;i