Closed felmue closed 6 months ago
@felmue What problems did you encounter?
@felmue I ran M5Dial_GPS_Unit_UIFlow2.0.2 using firmware 2.0.4 and it seemed to run normally. What did I miss?
Hello @lbuque
thank you for checking. Hmm, strange. And you are running UIFlow2.0.4 firmware on your M5Dial installed with M5Burner?
Thanks Felix
@felmue The startup ui uses port a. When running main.py, it is not initialized, which will cause uart initialization to fail.
This is my solution:
diff --git a/m5stack/modules/startup/dial/framework.py b/m5stack/modules/startup/dial/framework.py
index d1327d5..8a07ea4 100644
--- a/m5stack/modules/startup/dial/framework.py
+++ b/m5stack/modules/startup/dial/framework.py
@@ -49,12 +49,12 @@ class Framework:
app.start()
async def run(self):
- self.i2c0 = I2C(0, scl=Pin(15), sda=Pin(13), freq=100000)
+ # self.i2c0 = I2C(0, scl=Pin(15), sda=Pin(13), freq=100000)
self._kb_status = False
- if 0x5F in self.i2c0.scan():
- self._kb = CardKBUnit(self.i2c0)
- self._event = KeyEvent()
- self._kb_status = True
+ # if 0x5F in self.i2c0.scan():
+ # self._kb = CardKBUnit(self.i2c0)
+ # self._event = KeyEvent()
+ # self._kb_status = True
rotary = Rotary()
self._bar and self._bar.start()
I don't recommend using UART on PORTA.
@felmue The startup ui uses port a. When running main.py, it is not initialized, which will cause uart initialization to fail.
This is my solution:
diff --git a/m5stack/modules/startup/dial/framework.py b/m5stack/modules/startup/dial/framework.py index d1327d5..8a07ea4 100644 --- a/m5stack/modules/startup/dial/framework.py +++ b/m5stack/modules/startup/dial/framework.py @@ -49,12 +49,12 @@ class Framework: app.start() async def run(self): - self.i2c0 = I2C(0, scl=Pin(15), sda=Pin(13), freq=100000) + # self.i2c0 = I2C(0, scl=Pin(15), sda=Pin(13), freq=100000) self._kb_status = False - if 0x5F in self.i2c0.scan(): - self._kb = CardKBUnit(self.i2c0) - self._event = KeyEvent() - self._kb_status = True + # if 0x5F in self.i2c0.scan(): + # self._kb = CardKBUnit(self.i2c0) + # self._event = KeyEvent() + # self._kb_status = True rotary = Rotary() self._bar and self._bar.start()
I don't recommend using UART on PORTA.
This method does not solve the problem 100%. It still has a high probability of abnormalities.
Hello @lbuque
thank you for looking into this.
BTW: I tried port B (instead of port A), but I get the same error as reported before.
Thanks Felix
@felmue I updated Dial's firmware on M5Burner, please verify.
Hello @lbuque
I can confirm that M5Dial v2.0.4--hotfix firmware resolves the issue. I tested port A and B and both work fine now.
Thank you very much.
Thanks Felix
Note: not sure if that is the correct fix, but it works for me.