Search found 23 matches

by nesergen
Mon Jul 11, 2022 2:45 pm
Forum: General Discussion and Questions
Topic: Can`t run a programm
Replies: 4
Views: 1239

Re: Can`t run a programm

jimmo wrote:
Mon Jul 11, 2022 11:52 am
Ohh... wait... are you trying to use a cross-compiled main_v16.mpy as your main.py? I think pyb.main has to be a .py file. You can only load .mpy via import.
You are right. I`m trying to start .mpy file. It`s not clear in docs that pyb.main() can only starts .py files.
by nesergen
Mon Jul 11, 2022 11:06 am
Forum: General Discussion and Questions
Topic: Can`t run a programm
Replies: 4
Views: 1239

Can`t run a programm

Good day! I`m trying to start the program using function pyb.main(bootFileName) in the boot.py . But I get an error: 13:50:57.924 -> Traceback (most recent call last): 13:50:57.924 -> File "main_v16.mpy", line 1 13:50:57.924 -> SyntaxError: invalid syntax It is strange because if I use import bootFi...
by nesergen
Tue Jun 21, 2022 8:20 pm
Forum: ESP8266 boards
Topic: Maximum possible machine.Timer period
Replies: 17
Views: 12549

Re: Maximum possible machine.Timer period

I have faced this error too. I`m trying to set timer 4200000 ms (70 minutes), but it happens almost immediately after about 256 ms. As a try I changed the period to 42000 ms and I got proper behavior of the timer. What the reason of this malfunction?
I use STM32f411 plate.
by nesergen
Mon Jul 05, 2021 5:50 pm
Forum: Other Boards
Topic: [stm32f411] using USB pins
Replies: 3
Views: 2615

Re: [stm32f411] using USB pins

There is a line like this in my settings:

Code: Select all

// USB config
#define MICROPY_HW_USB_FS (1)
As I understand it, it includes support for USB. But the pins used are not listed. Maybe they are listed in another firmware file?
by nesergen
Mon Jul 05, 2021 12:49 pm
Forum: Other Boards
Topic: [stm32f411] using USB pins
Replies: 3
Views: 2615

[stm32f411] using USB pins

Good day! I am doing a project on the STM32f411 board. I check the code errors through a computer via a USB cable and a serial monitor. As development progresses, so does the need for pins. Do I understand correctly that if I connect the board to the computer via USB, then I can no longer use some p...
by nesergen
Mon Jul 05, 2021 11:57 am
Forum: General Discussion and Questions
Topic: timer self-overlay
Replies: 2
Views: 1193

timer self-overlay

I added a timer to the program, but I can't figure out one thing. Set the timer to fire every 1 second. Now the timer will perform a certain task. But what if the duration of the task is more than 1 second? It turns out that the timer will work again and interrupt the execution of the previous task ...
by nesergen
Thu Jul 01, 2021 3:06 pm
Forum: Other Boards
Topic: [stm32f411] sleep mode and irq button
Replies: 0
Views: 1735

[stm32f411] sleep mode and irq button

Good day! On my board I configured an irq interrupt button. I put the board into a light sleep mode. When a button is pressed during sleep, an interrupt and its associated function are triggered. And after activating waking up timer, another function is triggered. Here's my example: import machine, ...
by nesergen
Thu Jul 01, 2021 8:17 am
Forum: General Discussion and Questions
Topic: Restoring usb connection after sleep.
Replies: 0
Views: 864

Restoring usb connection after sleep.

I`m using STM32f411 board. Linux Mint20. I write a program and test it on the board, output the test data to a serial monitor. My program periodically enters the board into a sleep state (light sleep), while the USB connection is terminated. After waking up, the connection is not restored automatica...
by nesergen
Fri Jun 04, 2021 10:29 am
Forum: General Discussion and Questions
Topic: Question about Timers
Replies: 3
Views: 1726

Re: Question about Timers

davef wrote:
Fri Jun 04, 2021 6:10 am
What hardware are you running on?

ESP8266 virtual timers
ESP32 hardware timers
I'm sorry, I forgot to specify my equipment. I am using stm32f411 board.
by nesergen
Thu Jun 03, 2021 9:39 pm
Forum: General Discussion and Questions
Topic: Question about Timers
Replies: 3
Views: 1726

Question about Timers

Good day! I want to use timers in my program to periodically execute a part of the code, without referring to any pins. According to the documentation, to activate the timer, you need to write the following line, which usually includes the identifier (built-in number) of the timer. machine.Timer(id,...