hello Nixie

Dependencies:   mbed

Fork of NiXie by Chen Huan

Files at this revision

API Documentation at this revision

Comitter:
zhangyx
Date:
Mon Oct 09 16:31:25 2017 +0000
Parent:
2:57e4a4136076
Commit message:
demo

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 57e4a4136076 -r f5ff314d5a4c main.cpp
--- a/main.cpp	Thu Jun 29 10:14:40 2017 +0000
+++ b/main.cpp	Mon Oct 09 16:31:25 2017 +0000
@@ -3,30 +3,13 @@
 
 //数码管驱动示例
 
-Nixie myNixie(PA_0,PA_1,PA_4); //声明数码管类 依次是 DIO SCK RCK 任意GPIO脚都可以
- 
-int pos = 0, num = 0;
-bool WithDot = false;
+Nixie myNixie(PB_9,PB_7,PB_8); //声明数码管类 依次是 DIO SCK RCK 任意GPIO脚都可以
+
 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;
-        */
+        myNixie.NixieShowNumber(12345678,5);
+        wait_us(1);
     }
 }