Replies: 6 comments 1 reply
-
No, not an any ESP32 variant. I assume that you use an ESP32. If it is repeatable, it could be a problem of your terminal software or your board. |
Beta Was this translation helpful? Give feedback.
-
If the firmware is really doing this it would break any application that used floats. Are you sure your firmware build matches your ESP32 hardware? Please describe the ESP32 hardware you're using if you want us to try to replicate this problem. |
Beta Was this translation helpful? Give feedback.
-
FWIW: So if it is actually a bug, the errors should show up in the test results of that build, although I'm not sure in which of the CI steps that could be found |
Beta Was this translation helpful? Give feedback.
-
Maybe you get >>> (-1) ** 0.5
(6.123233995736766e-17+1j) Run your code and if it still produces the imaginary number, then post your code. |
Beta Was this translation helpful? Give feedback.
-
This is the code:
The line that fails with complex number error is time.sleep(ton) blink pin2 loop10 ondelay1j offdelay1.0 globally renaming "ton" to "tion" fixed the problem... which indicates to me that some kind of weird stability issues must be at play with either my build, or my board. The same 1j problem appeared in a different program of mine as well. What makes no sense, is that there's a LOAD of other python stuff running before mine does, all of which is fine. It's an ESP32CAM board. |
Beta Was this translation helpful? Give feedback.
-
Can you print the value of Note you should be able to
But is this sample minimal, i.e. is this the only thing needed to reproduce the issue? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm doing stuff like this:
and the output is this
1j
(plus trying to use it in time.sleep(tin) whines about not allowing complex numbers).
I'm on bleeding-edge: MicroPython v1.23.0-preview.43.g215a982c1
Beta Was this translation helpful? Give feedback.
All reactions