Search found 2754 matches
- Wed Nov 11, 2020 11:12 pm
- Forum: Programs, Libraries and Tools
- Topic: pin-init in main; no knows in subroutines?
- Replies: 1
- Views: 1330
Re: pin-init in main; no knows in subroutines?
How can I pass on the imports and definitions? This should work the same way it does in regular Python. The best way to solve this is to pass the pin as an argument when you call the subroutines in the other file. main.py: import driver p = machine.Pin(1, mode=machine.Pin.OUT) driver.do_stuff(p) dr...
- Wed Nov 11, 2020 9:33 am
- Forum: General Discussion and Questions
- Topic: pyboard tool error
- Replies: 8
- Views: 4260
Re: pyboard tool error
mpr isn't a pypi package, so you won't be able to install it with pip.
It's still in development, and the PR hasn't been merged yet. As roberthh said, it's available at the in-progress PR here: https://github.com/micropython/micropyt ... 6375/files
- Wed Nov 11, 2020 9:31 am
- Forum: General Discussion and Questions
- Topic: How to read a file using C language
- Replies: 6
- Views: 3160
Re: How to read a file using C language
Exactly the same -- mp_stream_rw
- Wed Nov 11, 2020 12:12 am
- Forum: General Discussion and Questions
- Topic: How to read a file using C language
- Replies: 6
- Views: 3160
Re: How to read a file using C language
I'm currently using MicroPython to develop esp32 board. Now I need to read a file in flash in main.c. How could I do this? Could anybody show me an example? Thanks You can use mp_vfs_open (see extmod/vfs.h) to open the file which will return a stream object, that you can use mp_stream_rw (or mp_str...
- Mon Nov 09, 2020 7:14 am
- Forum: Other Boards
- Topic: Is it possible to execute a micropython code on Rasperry Pi ?
- Replies: 11
- Views: 7920
Re: Is it possible to execute a micropython code on Rasperry Pi ?
I looked into this post before post, but i don't know how to use spi and i2c with this script. That script provides a way to use /dev/i2c from MicroPython. It's called SMBus but that's (mostly) just another name for I2C. But really, on a Raspberry Pi, you might just be better off using regular Pyth...
- Mon Nov 09, 2020 7:11 am
- Forum: Other Boards
- Topic: SAMD51J19 Port
- Replies: 3
- Views: 2514
Re: SAMD51J19 Port
I would love to see more work done on this port but sadly it's extremely very bare bones. The idea was to do the "hard" bit (i.e. get it to boot) and then hopefully people would be able to contribute the various drivers and Python APIs but this hasn't happened yet... So I have some questions. 1. Are...
- Mon Nov 09, 2020 7:07 am
- Forum: ESP32 boards
- Topic: Memmory issue
- Replies: 3
- Views: 1758
Re: Memmory issue
Freezing code will definitely help as it will no longer have to store the bytecode in RAM.
See my replies to this twitter thread earlier today for some more hints on avoiding memory fragmentation -- https://twitter.com/alexeckermann/statu ... 9415301120
See my replies to this twitter thread earlier today for some more hints on avoiding memory fragmentation -- https://twitter.com/alexeckermann/statu ... 9415301120
- Mon Nov 09, 2020 7:04 am
- Forum: Pyboard D-series
- Topic: High Speed USB PHY
- Replies: 7
- Views: 7663
Re: High Speed USB PHY
Can anyone confirm whether settting the USB parameter to "high speed" addresses this issue? Alternatively, is there a way to use the EMMC module to log locally and tranfer later? https://store.micropython.org/product/WBUS-EMMC Yes to both questions. High speed mode works on the SF3W, and the EMMC c...
- Mon Nov 09, 2020 7:02 am
- Forum: ESP32 boards
- Topic: Configure ESP32 WiFi over Bluetooth
- Replies: 2
- Views: 3067
Re: Configure ESP32 WiFi over Bluetooth
Please see http://docs.micropython.org/en/latest/l ... tooth.html and https://github.com/micropython/micropyt ... /bluetooth
This is supported on ESP32 and STM32 (e.g. pyboard d)
This is supported on ESP32 and STM32 (e.g. pyboard d)
- Fri Nov 06, 2020 3:19 am
- Forum: Development of MicroPython
- Topic: Native machine code bss corruption
- Replies: 3
- Views: 2287
Re: Native machine code bss corruption
See Damien's reply on that issue. Doesn't look like there's currently a workaround sorry...