micro:bit クロックモジュールで時刻を刻む
クロックモジュールはリアルタイムクロックDS1307 搭載、I2C接続、EEPROM:AT24C32(32Kb)搭載されているため、電源が落ちても、時間を計測し続けることが可能です。データロギング、時計の作成、時間の書き込み、タイマー、アラームなどに最適です。



クロックモジュール用のブロックを使用し時計のプログラムを作成する。
① MakeCodeを開き +拡張機能 をクリック
② DS1307 で検索し、DS1307を選択
③ クロックモジュール用のブロック を使用

② DS1307 で検索し、DS1307を選択

③ クロックモジュール用のブロック を使用


リンク
○ クロックモジュールで時計が作成できます。ただし、1日で2秒程度増減する可能性があります。
〇 micro:bit を 学ぶ上で書籍やWebpageを参考に作っていますが、私なりに噛み砕いて書いているつもりですが、判らない点がありましたら連絡下さい。