Replies: 2 comments 3 replies
-
Hi Volkan, Were you able to solve the issue, I am also facing same issue. Thank you |
Beta Was this translation helpful? Give feedback.
3 replies
-
According to your test script, the official firmware gives you 500ms of sound, but your custom firmware gives you the full 3s? Please try this simple script: import _thread as th
from time import sleep_ms
cnt = 20
def fun1():
global cnt
while cnt > 10:
print(f'fun1: {cnt}')
sleep_ms(200)
cnt -= 1
print(f'fun1 terminating')
th.start_new_thread(fun1,())
sleep_ms(500)
cnt = 0 If thread is working, you will get something similar to this result when running in REPL Ctrl+E, Ctrl+D:
The test was performed using the custom firmware MicroPython v1.22.0-preview.1.g523284777.dirty with ESP32-S2FN4R2. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Everyone,
I made my custom ESP32 firmware and upload it to my custom ESP32 Board but Thread does not work right. I don't know why it does not work well. The problem is it creates threads but it does not work async, it is still sync.
That is how suppose to be thread:
My thread behave is
So it works like just no threading. Just normal processing.
Also, I guess my bin file's size is allocated to CPU1 from CPU0. How could I fix it? Even I do not add any module, It still allocates to CPU1.
There is my code below, I wanted to test my thread function and code. So I play a wav file which is around 3 seconds but to test it I wait 500 ms then I turn it of by change it's status.
Thank you in advance for your help,
Volkan
My Code:
There is console return when push the reset button:
Beta Was this translation helpful? Give feedback.
All reactions