Keyestudio Smart Little Turtle Robot V3 Manual page 154

Table of Contents

Advertisement

www.keyestudio.com
subroutine LEDArray
for(int j=7; j>=0; j--) //Every data(byte) has 8 bits, therefore, loop
for eight times
{
if((LEDArray[i]&0x01)>0) //judge if the last bit of data is greater than
0
{
myMatrix.drawPixel( j, i,1); //light up the corresponding point
}
else //otherwise
{
myMatrix.drawPixel( j, i,0); //turn off the corresponding point
}
LEDArray[i] = LEDArray[i]>>1; //LEDArray[i] moves right for one bit
to judge the previous one bit
}
}
myMatrix.writeDisplay(); // dot matrix shows
}
//**************************************************************************
154

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents