Search found 6 matches

by plugowski
Wed Apr 21, 2021 1:00 pm
Forum: Development of MicroPython
Topic: Attaching main.py into the build firmware.
Replies: 3
Views: 2831

Re: Attaching main.py into the build firmware.

So is there any option to create main.py on fly using _boot.py? Like copy it somehow into filesystem?
by plugowski
Wed Apr 21, 2021 6:12 am
Forum: Development of MicroPython
Topic: Attaching main.py into the build firmware.
Replies: 3
Views: 2831

Attaching main.py into the build firmware.

Hi, I didn't develop for a while in micropython, last version I used was v1.10 or 1.11. So there was (as I remember) folder scripts, where I was able to put my main.py script file and when I build firmware and flash it it was already on board and worked. Now in ports/esp32 this folder dissapeared an...
by plugowski
Wed Apr 25, 2018 5:07 pm
Forum: ESP32 boards
Topic: How calculate time.ticks_ms for long periods?
Replies: 9
Views: 9674

Re: How calculate time.ticks_ms for long periods?

Okay, stupid me. You're right, and it finally works for me :D
by plugowski
Wed Apr 25, 2018 5:06 pm
Forum: General Discussion and Questions
Topic: Problem with socket.recv()
Replies: 1
Views: 1994

Problem with socket.recv()

Hi, I have some problem, I try to rebuild websocket library provided by @BetaRavener - here is my code: https://github.com/plugowski/micropython-utils/blob/uwebsocket/uwebsocket/__init__.py Problem is with socket.recv() method, it looks like it stuck here and doesn't return anything... Is somebody a...
by plugowski
Wed Apr 11, 2018 7:36 am
Forum: ESP32 boards
Topic: How calculate time.ticks_ms for long periods?
Replies: 9
Views: 9674

Re: How calculate time.ticks_ms for long periods?

True, I don't really need microseconds precission, but if I understand documentation, TICKS_MAX is the same for us as well as for ms. I rewrite a code using RTC, but convert tuple to microseconds costs couple milliseconds. Mistake of couple ms should be fine. btw. tuple of rtc.datetime() is (year, m...
by plugowski
Tue Apr 10, 2018 6:01 am
Forum: ESP32 boards
Topic: How calculate time.ticks_ms for long periods?
Replies: 9
Views: 9674

How calculate time.ticks_ms for long periods?

Hi, I build photo slider based on ESP32 and I use PWM + sleep_ms to define distance which has to be reached by stepper motor. The case is to show user actual distance which dolly moved, so I need to know how long actually motor works. I use something like that (pseudo code): [code] freq = # calculat...