Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
pin_low (S2); //this is the major part //read the top row pin_high(S0); pin_high(S1); rprintf("%d \n",forceAr[0]) forceAr[0] = a2dConvert8bit(ADC_NUMBER_TO_CHANNEL(0)); forceAr[0] = a2dConvert8bit(ADC_NUMBER_TO_CHANNEL(0)); rprintf("%d \n",forceAr[0])
pin_high (S2); //read the top row pin_high(S0); pin_high(S1); rprintf("%d \n",forceAr[16]) forceAr[16] = a2dConvert8bit(ADC_NUMBER_TO_CHANNEL(12)); forceAr[16] = a2dConvert8bit(ADC_NUMBER_TO_CHANNEL(12)); rprintf("%d \n",forceAr[16])
tags work :-PMIKE
forceAr[0] = a2dConvert8bit(ADC_NUMBER_TO_CHANNEL(0)); rprintf("%d \n",forceAr[0])
//Make the encoderQUADRATURE quad1 = MAKE_GENERIC_QUADRATURE(f1m1ENCInt,f1m1ENCP,false,1368,false); //the bottom motor of finger 1QUADRATURE quad2 = MAKE_GENERIC_QUADRATURE(f1m2ENCInt,f1m2ENCP,false,1368,false); //the top motor of figner 1QUADRATURE quad3 = MAKE_GENERIC_QUADRATURE(f2m1ENCInt,f2m1ENCP,false,1368,false); //the bottom motor of Finger 2QUADRATURE quad4 = MAKE_GENERIC_QUADRATURE(f2m2ENCInt,f2m2ENCP,false,1368,false); //the top motor of finger 2
Still doesn't explain why the code sometimes works and sometimes doesn't, though :-P
readSensors1();readSensors2();
readSensors2();readSensors1();
forceAr[x]