Robofun 機器人論壇

 找回密碼
 申請會員
搜索
熱搜: 活動 交友 discuz

急!!!!!!!arduino藍芽計時器

查看數: 2645 | 評論數: 3 | 收藏 0
關燈 | 提示:支持鍵盤翻頁<-左 右->
    組圖打開中,請稍候......
發佈時間: 2013-12-21 21:23

正文摘要:

如標題,先附上設計方塊圖 以下是程式 #include <Event.h> #include <Timer.h> #include <SoftwareSerial.h>    // 引用「軟體序列埠」程式庫 SoftwareSerial BT(6, 7);   // 設定軟體序列埠 ...

回復

603124 發表於 2013-12-24 11:43:48
delay可以同時設兩個變數嗎?
603124 發表於 2013-12-23 09:39:48
已收到,感謝
HelloEdward 發表於 2013-12-22 05:43:32
時鐘程式給您參考如果您是在台中
是可以一起來研究
unsigned char timer_hour,timer_minute,timer_second;
void second_proc(void)
{

timer_second++ ;             //max. state 23:59:59
    if(timer_second >= 60)
    {
   
timer_second = 0;
        timer_minute++ ;
        if(timer_minute >= 60)
        {
        
timer_minute = 0 ;
            timer_hour++ ;
            if(timer_hour >= 24)
            {
            
timer_hour = 0 ;
            }
        }
    }

}

小黑屋|手機版|Archiver|機器人論壇 from 2005.07

GMT+8, 2024-9-30 17:32 , Processed in 0.169757 second(s), 11 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表