生データ表示(Write RAW Data)にて上手くいきましたのでご報告です。
下記の内容で無事期待通りの動作をしてくれました。
テスト動画(imgur)
もしかしたらWrite Characterのバグ?の可能性があるかもしれません。
ありがとうございました。
生データ表示(Write RAW Data)にて上手くいきましたのでご報告です。
下記の内容で無事期待通りの動作をしてくれました。
テスト動画(imgur)
もしかしたらWrite Characterのバグ?の可能性があるかもしれません。
ありがとうございました。
@kimurer さん
コメント頂きありがとうございました。
ご教示頂きました方法で試してみたのですが、1桁目に"1"が表示されるのみとなりました。
当初私もコメント頂いた方法で試してみたのですが上手くいかず、試行錯誤の結果とりあえず2桁目までは表示できたのですが・・・と言った感じです。
生データの表示コマンド等もあるのでもう少し試行錯誤してみようと思います。
ありがとうございました。
Digi-Clockモジュールの3桁目・4桁目表示方法について
初めまして。
UIFlow2.0にて、Digi-Clockモジュールの3桁目・4桁目に1文字ずつ表示(Write Character)する方法がわかりません。
1文字目・2文字目は問題なく表示出来ます。また、文字列としての表示(Write String)も問題ありません。
Write Characterの表示位置指定は0~4までしか無いため、3桁目、4桁めは手動で5、7をそれぞれ指定しています。
添付のUIflowの場合、12:__表示の2秒後、34:__と言う表示になります。(1桁目、2桁目のみが更新され、3桁目、4桁目は消灯のまま変化なし)
毎回文字列を生成したうえでwrite stringによる表示としても良いのですが、更新時のちらつきを極力抑えたいため、write characterによる各桁個別の表示更新をしたいと考えています。
このような使い方の経験がある方がおられましたらアドバイス頂ければと思います。
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")
@ajb2k3
Thanks for your reply.
I tried several times and found what am I wrong.
I was wrote only configuration with "Configure" button in M5burner.
Then it burned just only configuration but no other firmware.
So it should burn with "Burn" button. Then firmware and configuration were written correctly.
Thanks for your help.
Regards
Hello ajb2k3.
Thanks for your reply.
Yes, I erased before burnning.
The problem is no response when writing program into M5stack Basic with Web Terminal. (Just only displaying "Progress:" and progrss bar did not forwarding.)
It occures only combination with UIFlow2 and M5Stack basic.
(it is ok UIFlow1 and M5stack basic, also UIFlow2 and ATOMS3U is no probelm.)
Thus I assume UIFlow2 is not burnned correctly into my M5Stack Basic.
(In problem case, 24576 bytes was written. However other successed cases, 4186112bytes or 8384512 bytes written. I feel 24576bytes is too much small than oter cases. )
Also I tried to burnning UIFlow 2.0.3(4MB and 16MB) and 2.0.4(4MB and 16MB) with M5Burner but these were same result. (I tested UIFlow2.0. NOT UIFlow2.0 Fire)
So could you please let me know it you have any suggestions as to what shall I check?
Thank you
Regards
Hello
I tried to burn UIFlow2.0(v2.0.4-16MB) with M5burner but it seems not correctly burned.
Below is the result of M5burner. I feel M5burner burned very small amount.
(It wrote just only 24576bytes)
Also I tried to burn UIflow1, then it worked fine, no problem.
Additionally I tested with AtomS3U/UIFlow2.0.4. It also no problem.
Could someone please help me?
What settings should I check?
----------result of burn UIFlow2.0.4 into M5Stack basic----
Detecting chip type...
ESP32
Chip is ESP32-D0WDQ6-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 78:21:84:a6:58:4c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00009000 to 0x0000efff...
Compressed 24576 bytes to 470...
Writing at 0x00009000... (100 %)
Wrote 24576 bytes (470 compressed) at 0x00009000 in 0.3 seconds (effective 569.3 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
----------result of burn UIFlow1.13.4 into M5Stack basic----
Detecting chip type...
ESP32
Chip is ESP32-D0WDQ6-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 78:21:84:a6:58:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x003ff000 to 0x003fffff...
Flash will be erased from 0x00000000 to 0x003fdfff...
Compressed 100 bytes to 31...
Writing at 0x003ff000... (100 %)
Wrote 100 bytes (31 compressed) at 0x003ff000 in 0.0 seconds (effective 18.3 kbit/s)...
Hash of data verified.
Compressed 4186112 bytes to 2526007...
Writing at 0x00000000... (0 %)
Writing at 0x00010bfa... (1 %)
Writing at 0x00017cfe... (1 %)
Writing at 0x00020bd2... (2 %)
.....
Writing at 0x003fd154... (100 %)
Wrote 4186112 bytes (2526007 compressed) at 0x00000000 in 40.2 seconds (effective 833.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
----------result of burn UIFlow2.0.4 into ATOMS3U----
--chip auto --port COM5 --baud 921600 --before default_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x000 C:\Users\ABC\Documents\M5burner\packages\tmp\uiflow2-mixin.bin
esptool.py v4.6.2
Serial port COM5
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 70:04:1d:d3:52:48
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 8MB
Flash will be erased from 0x00000000 to 0x007fefff...
Compressed 8384512 bytes to 3140155...
Writing at 0x00000000... (0 %)
Writing at 0x000127c8... (1 %)
...
Writing at 0x0057da35... (99 %)
Writing at 0x0070947b... (100 %)
Wrote 8384512 bytes (3140155 compressed) at 0x00000000 in 36.8 seconds (effective 1820.8 kbit/s)...
Hash of data verified.
Thank you
Regards