You are right. I`m trying to start .mpy file. It`s not clear in docs that pyb.main() can only starts .py files.
Search found 23 matches
- Mon Jul 11, 2022 2:45 pm
- Forum: General Discussion and Questions
- Topic: Can`t run a programm
- Replies: 4
- Views: 1241
Re: Can`t run a programm
- Mon Jul 11, 2022 11:06 am
- Forum: General Discussion and Questions
- Topic: Can`t run a programm
- Replies: 4
- Views: 1241
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...
- Tue Jun 21, 2022 8:20 pm
- Forum: ESP8266 boards
- Topic: Maximum possible machine.Timer period
- Replies: 17
- Views: 12642
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.
I use STM32f411 plate.
- Mon Jul 05, 2021 5:50 pm
- Forum: Other Boards
- Topic: [stm32f411] using USB pins
- Replies: 3
- Views: 2632
Re: [stm32f411] using USB pins
There is a line like this in my settings:
As I understand it, it includes support for USB. But the pins used are not listed. Maybe they are listed in another firmware file?
Code: Select all
// USB config
#define MICROPY_HW_USB_FS (1)
- Mon Jul 05, 2021 12:49 pm
- Forum: Other Boards
- Topic: [stm32f411] using USB pins
- Replies: 3
- Views: 2632
[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...
- Mon Jul 05, 2021 11:57 am
- Forum: General Discussion and Questions
- Topic: timer self-overlay
- Replies: 2
- Views: 1195
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 ...
- Thu Jul 01, 2021 3:06 pm
- Forum: Other Boards
- Topic: [stm32f411] sleep mode and irq button
- Replies: 0
- Views: 1816
[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, ...
- Thu Jul 01, 2021 8:17 am
- Forum: General Discussion and Questions
- Topic: Restoring usb connection after sleep.
- Replies: 0
- Views: 899
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...
- Fri Jun 04, 2021 10:29 am
- Forum: General Discussion and Questions
- Topic: Question about Timers
- Replies: 3
- Views: 1734
Re: Question about Timers
I'm sorry, I forgot to specify my equipment. I am using stm32f411 board.
- Thu Jun 03, 2021 9:39 pm
- Forum: General Discussion and Questions
- Topic: Question about Timers
- Replies: 3
- Views: 1734
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,...