Search found 2015 matches

by jimmo
Wed Nov 11, 2020 11:30 pm
Forum: ESP32 boards
Topic: Cross compiling Micropython from GITHUb source -errors
Replies: 20
Views: 1991

Re: Cross compiling Micropython from GITHUb source -errors

/home/pi/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc: 3: /home/pi/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc: Syntax error: Unterminated quoted string This is quite a surprising error... this looks like it's trying to run xtensa-esp32-elf-gcc as if it were a bash script. Can you please try doi...
by jimmo
Wed Nov 11, 2020 11:12 pm
Forum: Programs, Libraries and Tools
Topic: pin-init in main; no knows in subroutines?
Replies: 1
Views: 378

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...
by jimmo
Wed Nov 11, 2020 9:33 am
Forum: General Discussion and Questions
Topic: pyboard tool error
Replies: 8
Views: 678

Re: pyboard tool error

manos wrote:
Wed Nov 11, 2020 8:54 am
python3 -m pip install mpr
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
by jimmo
Wed Nov 11, 2020 9:31 am
Forum: General Discussion and Questions
Topic: How to read a file using C language
Replies: 6
Views: 727

Re: How to read a file using C language

heiseiggg wrote:
Wed Nov 11, 2020 3:13 am
What if I want to modify the file from flash with C? Which file could be useful for me?
Exactly the same -- mp_stream_rw
by jimmo
Wed Nov 11, 2020 12:12 am
Forum: General Discussion and Questions
Topic: How to read a file using C language
Replies: 6
Views: 727

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...
by jimmo
Mon Nov 09, 2020 7:14 am
Forum: Other Boards
Topic: Is it possible to execute a micropython code on Rasperry Pi ?
Replies: 10
Views: 1268

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...
by jimmo
Mon Nov 09, 2020 7:11 am
Forum: Other Boards
Topic: SAMD51J19 Port
Replies: 3
Views: 321

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...
by jimmo
Mon Nov 09, 2020 7:07 am
Forum: ESP32 boards
Topic: Memmory issue
Replies: 3
Views: 320

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
by jimmo
Mon Nov 09, 2020 7:04 am
Forum: Pyboard D-series
Topic: High Speed USB PHY
Replies: 7
Views: 2011

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...
by jimmo
Mon Nov 09, 2020 7:02 am
Forum: ESP32 boards
Topic: Configure ESP32 WiFi over Bluetooth
Replies: 2
Views: 1175

Re: Configure ESP32 WiFi over Bluetooth