Search found 404 matches

by jimmo
Fri Aug 09, 2019 11:36 am
Forum: General Discussion and Questions
Topic: Relocatable environment
Replies: 1
Views: 57

Re: Relocatable environment

You can use the "-X heapsize=" option to increase the heap size, otherwise you can modify the "heap_size" variable at the top of ports/unix/main.c and build the micropython binary yourself. I tried quickly to test this out but I ran into other issues first using "virtualenv -p micropython" (e.g. os....
by jimmo
Fri Aug 09, 2019 5:42 am
Forum: General Discussion and Questions
Topic: Live pyboard visual is not being shown
Replies: 1
Views: 50

Re: Live pyboard visual is not being shown

Thanks for the report! I've let the site admin know.
by jimmo
Fri Aug 09, 2019 4:22 am
Forum: ESP32 boards
Topic: can I reset a thingy filesystem without flashing
Replies: 2
Views: 93

Re: can I reset a thingy filesystem without flashing

Hi, If you can get to the REPL, you can unmount the filesystem, recreate it, then re-mount it (or soft reset). >>> import os >>> os.umount('/') >>> from flashbdev import bdev >>> os.VfsFat.mkfs(bdev) >>> Ctrl-D to soft-reset (This is specific to ESP32 and ESP8266, other boards have equivalent method...
by jimmo
Fri Aug 09, 2019 12:20 am
Forum: ESP32 boards
Topic: reset after deadlock
Replies: 2
Views: 80

Re: reset after deadlock

I think esp32 pin interrupts are "soft" which means they need to be scheduled by MicroPython, which won't work if you're deadlocked.

Would the watchdog timer (WDT) be useful for this?
by jimmo
Thu Aug 08, 2019 12:17 pm
Forum: Hardware Projects
Topic: Flash Options
Replies: 3
Views: 135

Re: Flash Options

Thanks Jimmo - so following the example you link would mean the full SPI flash would show up like the internal memory? Is saving files a more involved process using SPI flash or does it work the same as SD card/internal flash? It works the same as internal flash -- it essentially takes the place of...
by jimmo
Thu Aug 08, 2019 11:29 am
Forum: ESP32 boards
Topic: Trouble connecting to SPI display sh1106
Replies: 8
Views: 178

Re: Trouble connecting to SPI display sh1106

DC -> GPIO26 (no idea where this should go) Can you clarify what you mean by "(no idea where this should go)" I've been trying to get it work with the Heltec wifi ESP32 and have not been able to figure it out! The pinout diagram is here: https://github.com/dakschnitzer/time-gu ... t%2032.pdf By the...
by jimmo
Thu Aug 08, 2019 11:22 am
Forum: MicroPython pyboard
Topic: pyboard not working
Replies: 1
Views: 57

Re: pyboard not working

Hi,

Can you provide more information -- does your program execute at all, or just fail to control the PWM and UART?

If you write a simple main.py that just flashes the LED and put it on the SD card, does that work?

What if you use internal flash rather than the SD card?
by jimmo
Thu Aug 08, 2019 11:19 am
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 253

Re: Embedding Micropython in a standalone C application (micropython/examples/embedding )

I resolved the second issue: I have changed in Makefile.upylib the CFLAGS option -std=gnu99 ( the correct option ) to -std=c99 ( the wrong one ). I don't know why this solved your problem...? usleep() is in unistd.h, which is already included in mphal.h. When I build examples/embedded, I did see th...
by jimmo
Thu Aug 08, 2019 9:30 am
Forum: MicroPython pyboard
Topic: more detail tutorial for external C modules?
Replies: 6
Views: 148

Re: more detail tutorial for external C modules?

what I need.. configure 2 IO pins as push-pull, able to pull them low/high and read. You'll need to use mp_hal_pin_input / _output / _high / _low /_read. Questions... 1. How do I make above example into class? I'd like to have something can take constructor arguments like i2c = I2C(scl='X1', sda='X...
by jimmo
Wed Aug 07, 2019 1:27 pm
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 253

Re: Embedding Micropython in a standalone C application (micropython/examples/embedding )

PR = Pull request. So you can get this fixed permanently.

But to solve the problem you just need to add

Code: Select all

#include <stdint.h>
to the top of mphal.h