Search found 3268 matches

by dhylands
Wed Feb 12, 2020 11:32 pm
Forum: ESP32 boards
Topic: How to read data from USB port, pyb.USB_VCP ?
Replies: 4
Views: 163

Re: How to read data from USB port, pyb.USB_VCP ?

You can use the UART.any() method to determine how many characters can be read without blocking:
http://docs.micropython.org/en/latest/l ... e.UART.any
by dhylands
Tue Feb 11, 2020 5:45 pm
Forum: Programs, Libraries and Tools
Topic: ModuleNotFoundError: No module named 'pyb'
Replies: 4
Views: 156

Re: ModuleNotFoundError: No module named 'pyb'

Which board are you using? The pyb module exists on the stm32 port, and doesn't exist on the ESP32 and ESP8266 ports.

The general preference is to use the machine module where possible.
by dhylands
Tue Feb 11, 2020 5:42 pm
Forum: Development of MicroPython
Topic: c++ linking problem NUCLEO_F767ZI
Replies: 1
Views: 89

Re: c++ linking problem NUCLEO_F767ZI

It looks like you need to enable some features?

You'll probably get better support by asking in the openmv forum: https://forums.openmv.io/
by dhylands
Tue Feb 11, 2020 5:35 pm
Forum: Programs, Libraries and Tools
Topic: A review of serialisation libraries
Replies: 10
Views: 309

Re: A review of serialisation libraries

I've also recently been looking into flat buffers which offer some advantages over protocol buffers.
https://google.github.io/flatbuffers/

Admittedly, I've been using flatbuffers in rust, and not in python, but I wouldn't really expect the programming language to make too much difference.
by dhylands
Mon Feb 10, 2020 3:56 pm
Forum: General Discussion and Questions
Topic: Pass pin as arg to LED and Switch
Replies: 1
Views: 109

Re: Pass pin as arg to LED and Switch

The pyb.LED module supports upto 4 LEDs. You need to configure them in your boards mpconfigboard.h file. For example, the PYBV11 board does this: https://github.com/micropython/micropython/blob/88cbfd791a06a405b05a9262e6d7ab6fb73ade57/ports/stm32/boards/PYBV11/mpconfigboard.h#L81-L89 The switch modu...
by dhylands
Thu Jan 30, 2020 10:47 pm
Forum: Programs, Libraries and Tools
Topic: Control exact polling rates using uasyncio
Replies: 16
Views: 481

Re: Control exact polling rates using uasyncio

On most 32-bit architectures (and definitely on the ARM), retrieving or storing a 32-bit value is an atomic operation. You'll never get 3 bytes from one time and an additional byte from an interrupt handler. You still have the potential problem that the main loop may have just retrieved the value an...
by dhylands
Thu Jan 30, 2020 8:53 pm
Forum: General Discussion and Questions
Topic: Pyboard writing to tvt/csv file
Replies: 6
Views: 223

Re: Pyboard writing to tvt/csv file

I tried your code and it wrote 833 lines, none with a value less than 1400. I had to add an import pyb to the top since it doesn't work without it. I was running on a PYBV10.
by dhylands
Mon Jan 27, 2020 4:36 pm
Forum: Other Boards
Topic: [NUCLEO-F401RE] procedure to upload the MicroPython image
Replies: 16
Views: 5498

Re: [NUCLEO-F401RE] procedure to upload the MicroPython image

You should be able to use st-flash to program the NUCLEO-F401RE. The Makefile has a deploy-stlink rule which will do the appropriate flashing steps:

Code: Select all

make BOARD=NUCLEO_F401RE deploy-stlink
This assumes that you have the stlink tools installed and setup.
by dhylands
Mon Jan 27, 2020 4:06 am
Forum: ESP32 boards
Topic: solutions for non-blocking rtttl ringtones?
Replies: 4
Views: 137

Re: solutions for non-blocking rtttl ringtones?

I'm not sure that any changes need to be made to upy-rtttl to support asyncio. The library was designed as a generator which returns a tuples. Each tuple contains the note to play and how long to play it for. Each time you call the generator it returns the next tuple. upy-rtttl doesn't have any inte...
by dhylands
Tue Jan 21, 2020 10:52 pm
Forum: Other Boards
Topic: Python REPL not starting on STM32H743 based board
Replies: 5
Views: 223

Re: Python REPL not starting on STM32H743 based board

I've not heard of having to program option bytes.