<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[質問：Digi-Clockモジュールの3桁目・4桁目表示方法について]]></title><description><![CDATA[<h1>タイトル</h1>
<p dir="auto">Digi-Clockモジュールの3桁目・4桁目表示方法について</p>
<h1>詳しい状況の説明</h1>
<p dir="auto">初めまして。<br />
UIFlow2.0にて、Digi-Clockモジュールの3桁目・4桁目に1文字ずつ表示（Write Character）する方法がわかりません。<br />
1文字目・2文字目は問題なく表示出来ます。また、文字列としての表示(Write String）も問題ありません。</p>
<p dir="auto">Write Characterの表示位置指定は０～４までしか無いため、3桁目、4桁めは手動で5、7をそれぞれ指定しています。<br />
添付のUIflowの場合、12:__表示の2秒後、34:__と言う表示になります。（1桁目、2桁目のみが更新され、3桁目、4桁目は消灯のまま変化なし）</p>
<p dir="auto">毎回文字列を生成したうえでwrite stringによる表示としても良いのですが、更新時のちらつきを極力抑えたいため、write characterによる各桁個別の表示更新をしたいと考えています。</p>
<p dir="auto">このような使い方の経験がある方がおられましたらアドバイス頂ければと思います。</p>
<h1>使用しているUIFlowやArduinoライブラリのバージョン</h1>
<ul>
<li>UIflow 2.1.1</li>
<li>AtomS3 Lite</li>
<li>Digi-Clock</li>
</ul>
<h1>再現可能なコード</h1>
<pre><code>import os, sys, io
import M5
from M5 import *
from hardware import *
from unit import DigiClockUnit
import time



timer0 = None
i2c0 = None
digiclock_0 = None
digiclock_1 = None


temp = None


def timer0_cb(t):
  global timer0, i2c0, digiclock_0, digiclock_1, temp
  pass

def setup():
  global timer0, i2c0, digiclock_0, digiclock_1, temp

  M5.begin()
  timer0 = Timer(0)
  i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000)
  digiclock_0 = DigiClockUnit(i2c0, 0x30)
  digiclock_0.clear()
  digiclock_0.set_char('1', 0)
  digiclock_0.set_char('2', 2)
  digiclock_0.set_char(':', 4)
  time.sleep(2)
  digiclock_0.set_char('3', 5)
  digiclock_0.set_char('4', 7)


def loop():
  global timer0, i2c0, digiclock_0, digiclock_1, temp
  M5.update()


if __name__ == '__main__':
  try:
    setup()
    while True:
      loop()
  except (Exception, KeyboardInterrupt) as e:
    try:
      from utility import print_error_msg
      print_error_msg(e)
    except ImportError:
      print("please update to latest firmware")


</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1723706660264-digi-clock.png" alt="digi-clock.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/topic/6704/質問-digi-clockモジュールの3桁目-4桁目表示方法について</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 01:47:27 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6704.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Aug 2024 07:35:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 質問：Digi-Clockモジュールの3桁目・4桁目表示方法について on Mon, 19 Aug 2024 07:03:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ymd_m" aria-label="Profile: ymd_m">@<bdi>ymd_m</bdi></a> さん<br />
貴重な情報をご教示くださいまして、ありがとうございます。<br />
Write RAW DataとWrite Characterの動作の違いをみると、おっしゃるとおりバグのように感じます。<br />
ファームウェアアップデートに期待です。</p>
<p dir="auto">UIFlow2、すごく扱いやすくて好きなのですが、ここだけの話、M5-Docsの情報も不足気味ですし、例えばセンサーの値をlabelに表示させる際、「整数に変換」を使ってもときどき小数点以下の値まで表示されるし…ところどころ、微妙に残念ポイントがある気がします。</p>
]]></description><link>https://community.m5stack.com/post/26153</link><guid isPermaLink="true">https://community.m5stack.com/post/26153</guid><dc:creator><![CDATA[kimurer]]></dc:creator><pubDate>Mon, 19 Aug 2024 07:03:19 GMT</pubDate></item><item><title><![CDATA[Reply to 質問：Digi-Clockモジュールの3桁目・4桁目表示方法について on Sun, 18 Aug 2024 04:28:06 GMT]]></title><description><![CDATA[<p dir="auto">生データ表示(Write RAW Data）にて上手くいきましたのでご報告です。<br />
下記の内容で無事期待通りの動作をしてくれました。<br />
<a href="https://imgur.com/a/tUtAl9q" target="_blank" rel="noopener noreferrer nofollow ugc">テスト動画(imgur)</a><br />
<img src="/assets/uploads/files/1723954729471-%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-18-131108.png" alt="スクリーンショット 2024-08-18 131108.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">もしかしたらWrite Characterのバグ？の可能性があるかもしれません。</p>
<p dir="auto">ありがとうございました。</p>
]]></description><link>https://community.m5stack.com/post/26149</link><guid isPermaLink="true">https://community.m5stack.com/post/26149</guid><dc:creator><![CDATA[ymd_m]]></dc:creator><pubDate>Sun, 18 Aug 2024 04:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to 質問：Digi-Clockモジュールの3桁目・4桁目表示方法について on Sun, 18 Aug 2024 03:49:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kimurer" aria-label="Profile: kimurer">@<bdi>kimurer</bdi></a> さん<br />
コメント頂きありがとうございました。</p>
<p dir="auto">ご教示頂きました方法で試してみたのですが、1桁目に"1"が表示されるのみとなりました。<br />
当初私もコメント頂いた方法で試してみたのですが上手くいかず、試行錯誤の結果とりあえず2桁目までは表示できたのですが・・・と言った感じです。<br />
生データの表示コマンド等もあるのでもう少し試行錯誤してみようと思います。</p>
<p dir="auto"><img src="/assets/uploads/files/1723952765586-%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-18-124242.png" alt="スクリーンショット 2024-08-18 124242.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">ありがとうございました。</p>
]]></description><link>https://community.m5stack.com/post/26148</link><guid isPermaLink="true">https://community.m5stack.com/post/26148</guid><dc:creator><![CDATA[ymd_m]]></dc:creator><pubDate>Sun, 18 Aug 2024 03:49:57 GMT</pubDate></item><item><title><![CDATA[Reply to 質問：Digi-Clockモジュールの3桁目・4桁目表示方法について on Fri, 16 Aug 2024 04:15:44 GMT]]></title><description><![CDATA[<p dir="auto">ymd_mさん、はじめまして<br />
Digi-Clockを持っていないのですが、興味があったので、もし可能であれば逆にご教示いただきたく投稿しています。</p>
<p dir="auto">もし、次の画像のようなフローを実行したら、どのような動作になるでしょうか。</p>
<p dir="auto">公式ドキュメント「Digi-Clock」<br />
<a href="https://docs.m5stack.com/ja/unit/digi_clock" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/ja/unit/digi_clock</a><br />
に書かれている「I2Cレジスタ表」を見ると、12:34表示の2秒後に34とだけ表示されるのではないかと思うのですが。</p>
<p dir="auto"><img src="/assets/uploads/files/1723781453125-uiflow2_block_1723781050632.png" alt="uiflow2_block_1723781050632.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">もしご迷惑でなければご教示いただけるとうれしいです。<br />
どうぞよろしくお願いいたします。</p>
<p dir="auto">kimurer</p>
]]></description><link>https://community.m5stack.com/post/26110</link><guid isPermaLink="true">https://community.m5stack.com/post/26110</guid><dc:creator><![CDATA[kimurer]]></dc:creator><pubDate>Fri, 16 Aug 2024 04:15:44 GMT</pubDate></item></channel></rss>