Demo entry 6684291

LCD

   

Submitted by anonymous on Dec 15, 2017 at 02:57
Language: C++. Code size: 3.0 kB.

    if(num < 50)  //空气质量指数:0~50
    {

        d->lcd->clearBuffer();
        //显示:空气净化器

        d->lcd->write_1616_at(14,0,GB_16[0]);
        d->lcd->write_1616_at(34,0,GB_16[1]);
        d->lcd->write_1616_at(54,0,GB_16[2]);
        d->lcd->write_1616_at(74,0,GB_16[3]);
        d->lcd->write_1616_at(94,0,GB_16[4]);

        //优
       // CTR_lcd c=new CTR_lcd();

        d->lcd->write_1616_at(54,24,GB_16[5]);


        //显示:质量指数;
        d->lcd->write_1616_at(4,48,GB_16[14]);
        d->lcd->write_1616_at(24,48,GB_16[15]);
        d->lcd->write_1616_at(44,48,GB_16[16]);
        d->lcd->write_1616_at(64,48,GB_16[17]);
        d->lcd->write_168_at(84,48,GB_8[10]);
    

        //导入空气质量数值
        if(hundred==0)
            d->lcd->write_168_at(90,48,GB_8[0]);
        if(hundred==1)
            d->lcd->write_168_at(90,48,GB_8[1]);
        if(hundred==2)
            d->lcd->write_168_at(90,48,GB_8[2]);
        if(hundred==3)
            d->lcd->write_168_at(90,48,GB_8[3]);
        if(hundred==4)
            d->lcd->write_168_at(90,48,GB_8[4]);
        if(hundred==5)
            d->lcd->write_168_at(90,48,GB_8[5]);
        if(hundred==6)
            d->lcd->write_168_at(90,48,GB_8[6]);
        if(hundred==7)
            d->lcd->write_168_at(90,48,GB_8[7]);
        if(hundred==8)
            d->lcd->write_168_at(90,48,GB_8[8]);
        if(hundred==9)
            d->lcd->write_168_at(90,48,GB_8[9]);

        if(decade==0)
            d->lcd->write_168_at(100,48,GB_8[0]);
        if(decade==1)
            d->lcd->write_168_at(100,48,GB_8[1]);
        if(decade==2)
            d->lcd->write_168_at(100,48,GB_8[2]);
        if(decade==3)
            d->lcd->write_168_at(100,48,GB_8[3]);
        if(decade==4)
            d->lcd->write_168_at(100,48,GB_8[4]);
        if(decade==5)
            d->lcd->write_168_at(100,48,GB_8[5]);
        if(decade==6)
            d->lcd->write_168_at(100,48,GB_8[6]);
        if(decade==7)
            d->lcd->write_168_at(100,48,GB_8[7]);
        if(decade==8)
            d->lcd->write_168_at(100,48,GB_8[8]);
        if(decade==9)
            d->lcd->write_168_at(100,48,GB_8[9]);

        if(unit==0)
            d->lcd->write_168_at(110,48,GB_8[0]);
        if(unit==1)
            d->lcd->write_168_at(110,48,GB_8[1]);
        if(unit==2)
            d->lcd->write_168_at(110,48,GB_8[2]);
        if(unit==3)
            d->lcd->write_168_at(110,48,GB_8[3]);
        if(unit==4)
            d->lcd->write_168_at(110,48,GB_8[4]);
        if(unit==5)
            d->lcd->write_168_at(110,48,GB_8[5]);
        if(unit==6)
            d->lcd->write_168_at(110,48,GB_8[6]);
        if(unit==7)
            d->lcd->write_168_at(110,48,GB_8[7]);
        if(unit==8)
            d->lcd->write_168_at(110,48,GB_8[8]);
        if(unit==9)
            d->lcd->write_168_at(110,48,GB_8[9]);


        d->lcd->flush();

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).