Datasheet
6
void loop()
{
if (encoder.rotate_flag ==1)
{
if (encoder.direct==1)
{
index_LED++;
if (index_LED>23)
index_LED=24;
SenttocircularBar(index_LED);
}
else
{
index_LED--;
if(index_LED<0)
index_LED=0;
SenttocircularBar(index_LED);
}
encoder.rotate_flag =0;
}
}
void SenttocircularBar(int index)
{
for (int i=0;i<24;i++)
{
if (i<index)
{
LED[i]=0xff;
}
else
LED[i]=0;
}
circularLED.CircularLEDWrite(LED);
}
Upload it to your Arduino/Seeeduino, please refer to here to learn how to upload sketches. You can see:










