hello Nixie

Dependencies:   mbed

Fork of NiXie by Chen Huan

main.cpp

Committer:
zhangyx
Date:
2017-06-29
Revision:
2:57e4a4136076
Parent:
1:ad106a887eb8
Child:
3:f5ff314d5a4c

File content as of revision 2:57e4a4136076:

#include "mbed.h"
#include "Nixie.h"

//数码管驱动示例

Nixie myNixie(PA_0,PA_1,PA_4); //声明数码管类 依次是 DIO SCK RCK 任意GPIO脚都可以
 
int pos = 0, num = 0;
bool WithDot = false;
int main() 
{
    while(1) 
    {
        myNixie.NixieShowNumber(90892301,5);
        /*
        wait(0.15);
        myNixie.NixieShow(num,pos,WithDot);//在数码管上显示数字 num 要显示的数字 pos 数字显示的位置 从左到右 0-7 WithDot 是否显示小数点
        num++;
        pos++;
        if(num == 10)
        {
            num = 0;
            if(WithDot)
                WithDot = false;
            else
                WithDot = true;
        }
        if(pos == 8)
            pos = 0;
        */
    }
}