Depends what you what you want to achieve.
If you mean to connect for programming/flashing the module - probably not.
You would need to reconfigure the UART0 to pin 26/32 - I'm not even sure this can be done.
If you just want to connect a "serial console" to communicate with your own running program then yes.
You just need to set up UART1 or 2 to GPIO26 and 32 in your own program.
Your console must be 3.3V TTL though
Cognitive5525
@Cognitive5525
Posts made by Cognitive5525
-
RE: Is it possible to connect two M5Atom with a cable...
-
RE: BALA2 Fire encoder question
There is an A & B pulse from each wheel.
I think you'll need to acquaint yourself with Quadrature Encoders.A quick check to do:
Try to make two temporary but firm mechanical stops with say 100 degrees distance (not important to know the exact angle between them) and then repeatedly move the wheel between the stops. You should get the same two values (+/- 1 or 2) every time at each stop. -
RE: BALA2 Fire encoder question
Are you counting incremental with both A and B pulses?
-
RE: BALA2 Fire encoder question
@slavav this one:
https://docs.m5stack.com/en/app/bala2fire
?
It seems not to appear on spec-sheet.If you have one in your possession, make a test-program to count it yourself ?
-
Core-Ink Screen rotation
I have an application where I need to put the Core-Ink upside down, hence I would like to rotate the complete screen output 180 degrees. I use only text labels
I tried to transform the output manually but I ran i to a problem with M5TextBox function.
It seems to limit the maximum coordinates by some value that depends on the font size.Here I have two labels defined with corresponding python code in the M5Flow:
This code however does not work. LABEL_1 is not shown on the screen.
I have to change the coordinates of the LABEL_1 to less than (160,160) and then the output works but looks like this:
The coordinates of the M5TextBox seems to be limited to (200 - <font size>) i.e. 160 for DejaVu40, 176 for DejaVu24 etc.I have also tried the lcd.setRotation() but it does not seem to do anything.
Yes the screenshots are from the M5flow but I have tried this on the Core-Ink :)
-
RE: M5Paper Shutdown() / Deep Sleep / Wakeup
@jop said in M5Paper Shutdown() / Deep Sleep / Wakeup:
overload-2 int shutdown( int seconds );
The timer function of the BM8563* is based on a 8 bit counter which can be set to be controlled by a clock frequency of 4096, 64, 1 or 1/60 Hz. This means it can timeout with following max interval @ resolution:
62,3 ms @ 244,1 µs
4 s @ 15,5 ms
255 s @ 1 s
15300 s (255 min) @ 60 s (1 min)so intervals above 255 seconds (4 min and 25 seconds) needs to be timed at one minute resolution.
I have however tested this on my CoreINK (UiFlow/mocropython) and found that it rounds down in intervals of 2 minutes (120 s) for some reason.
I made a script to that just put the unit to sleep but increases the sleep interval with 10 sec every time and then uses the clock to measure the actual sleep time. This was the result: -
RE: Micropython for Atom S3 Lite
I initially also had big problems connecting with Thonny
After changing the "submit_mode" to "raw" in the ESP32 section of the config file it worked:[ESP32] port = COM10 interrupt_on_connect = True sync_time = False local_rtc = False restart_interpreter_before_run = False submit_mode = raw
for further details: https://github.com/thonny/thonny/wiki/MicroPython see the chapter Advanced configuration
-
RE: UIflow power functions Core INK
Update: some further notes and a workaround solution.
I decided to dig a bit deeper into how the BM8563 RTC works and how it is initialized by the M5Stack Arduino C++ library. Without going into all the details I have so far found out the following:
Taking out the battery and leaving the CoreINK powerless does not in it self lead to the problem, as I have stated earlier in this thread. I seems the reason is some registers of the RTC sometimes become corrupted. Exactly how this happens, I'm not sure of, but one way may be when power (aka. the battery) is removed while data are written via I2C to the RTC. Important is however the matter of the fact: it can happen!
Apparently the the UIFlow firmware does not reset these registers correctly at start up. Digging into the Arduino library (which I knew could fix problem) I found the RTC init routine which resets the three control registers* of the BM8563. I then thought I could do the same with the I2C library in UIFlow. And sure enough, it works. So the workaround is to run the following code:
import i2c_bus i2c0 = i2c_bus.easyI2C(i2c_bus.M_BUS, 0x51, freq=400000) i2c0.write_u8(0x00, 0x00) i2c0.write_u8(0x01, 0x00) i2c0.write_u8(0x0D, 0x00)
some where in your script before the
m5stack.power.restart_after_seconds(n)
is called.
I haven't tested but I suppose it is the same if you use:
m5stack.power.restart_on(minutes=n, hours=n, date=n, weekday=n)
Notes to above code:
Please use the UIFlow I2C library (import i2c_bus) as the native Micropython I2C library (machine.I2C) messes up the "internal" I2C communication of the UIFlow firmware.
i2c_bus.M_BUS = (21,22) aka I2C pins for the BM8563 on the CoreINK
0x51 is the I2C address of the BM8563
0x00,0x01 and 0x0D are the control registers which are set to 0x00
The Arduino library for RTC init for comparison :void RTC::begin(void) { Wire1.begin(21, 22); WriteReg(0x00, 0x00); WriteReg(0x01, 0x00); WriteReg(0x0D, 0x00); }
*) please refer to the BM8563 datasheet for further details.
-
RE: Int to Float conversion
I'm not sure what A3 becomes since I can't see what A1 and A2 are, but:
A4 = (str(int(A3, 16)))
makes A4 a string which you can't do arithmetic on.
Provided that A3 can be converted to an integer, I would:
A4 = int(A3, 16)
A5 = A3 /1000
label0.setText(str(A5)) -
RE: Int to Float conversion
Since you posted under UIFlow, then that is what you use I suppose:
which results in the following Python code:my_val = my_val / 1000