Search found 43 matches

by oserror
Thu Jun 06, 2019 10:27 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 7979

Re: Need help freeing memory from unused modules

Thanks a lot. That makes sense.

I'll have to be careful when handling large variables/objects. I have been lazy working on modern-day machines where one can be sloppy.

I'm just glad I got the ssl working, albeit a tight squeeze! I'll see what else I can clean up in my code.
by oserror
Thu Jun 06, 2019 9:33 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 7979

Re: Need help freeing memory from unused modules

Okay, I got it working. I am not 100% on why this works. for i, value in enumerate(result): res = urequests.put(url='%s/%s/update/V%d' % (blynk_host, blynk_auth, i), json=['%s' % value]) if res.status_code != 200: print('Error updating pin V%d: %s' % (i, res.text)) else: print('Updated pin V%d' % i)...
by oserror
Thu Jun 06, 2019 8:07 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 7979

Re: Need help freeing memory from unused modules

Thanks a lot, Dave. I went through and did a "del sys.modules['module_to_remove'] and did the "gc.collect()" as well but I was still unable to do a https:// PUT with urequests. I also had trouble using the ssl module when I hacked together a manual request. It seems to me that I had some problems do...
by oserror
Thu Jun 06, 2019 7:02 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 7979

Need help freeing memory from unused modules

My main.py is as follows: import gc def do_beginning(): import weather_station return weather_station.main() def do_end(data): import send_and_finish send_and_finish.main(data) data = do_beginning() gc.collect() do_end(data) My problem is that weather_station.mpy does not get garbage collected. I do...
by oserror
Tue Apr 23, 2019 2:55 pm
Forum: General Discussion and Questions
Topic: Btree Module on stm32
Replies: 4
Views: 4163

Re: Btree Module on stm32

I know this is an old thread but I was able to build btree support into the Pyboard 1.1 firmware. If this interests you, make the following changes to the code: Change the target board to build for (pretty obvious but here it is) in the Makefile: BOARD ?= PYBV11 Copy posix_helpers.c from the esp8266...
by oserror
Tue Apr 16, 2019 11:17 pm
Forum: MicroPython pyboard
Topic: I can't access microSD cards with Pyboard 1.1
Replies: 28
Views: 60551

Re: I can't access microSD cards with Pyboard 1.1

Okay, the issue was that I was compiling for the defaulted Pyboard 1.0. I changed that in the very top of the Makefile. Using @ThomasChr's hack, I was able to patch the code in one place in the sdcard.c file, line 174: mp_hal_pin_config(MICROPY_HW_SDCARD_DETECT_PIN, MP_HAL_PIN_MODE_INPUT, MICROPY_HW...
by oserror
Tue Apr 16, 2019 9:04 pm
Forum: MicroPython pyboard
Topic: I can't access microSD cards with Pyboard 1.1
Replies: 28
Views: 60551

Re: I can't access microSD cards with Pyboard 1.1

I tried it. I have to leave the house in a few minutes, so I'll have to put this off for a while, but my initial test was to power up the Crow Pyboard with the altered firmware and no SD card.

I'll give it another shot later.

That is, it didn't boot.
by oserror
Tue Apr 16, 2019 7:23 pm
Forum: MicroPython pyboard
Topic: I can't access microSD cards with Pyboard 1.1
Replies: 28
Views: 60551

Re: I can't access microSD cards with Pyboard 1.1

You know, I'm looking at this code in main.c: (line 646) bool mounted_sdcard = false; #if MICROPY_HW_SDCARD_MOUNT_AT_BOOT // if an SD card is present then mount it on /sd/ if (sdcard_is_present()) { // if there is a file in the flash called "SKIPSD", then we don't mount the SD card if (!mounted_flas...
by oserror
Tue Apr 16, 2019 6:47 pm
Forum: MicroPython pyboard
Topic: I can't access microSD cards with Pyboard 1.1
Replies: 28
Views: 60551

Re: I can't access microSD cards with Pyboard 1.1

I merely put these lines into boot.py: # omitting your comment for brevity machine.Pin('A8', mode=machine.Pin.OUT, pull=None) # execute main.py on sd card pyb.main('/sd/main.py') and the async led flasher ran, with the uasyncio library on /sd/lib/uasyncio. This is pretty darn close to what I want an...
by oserror
Tue Apr 16, 2019 6:21 pm
Forum: MicroPython pyboard
Topic: I can't access microSD cards with Pyboard 1.1
Replies: 28
Views: 60551

Re: I can't access microSD cards with Pyboard 1.1

@ThomasChr: Great detective work! I just successfully mounted a microSD card in the REPL. Did you figure that out by looking at the schematic? I looked at some of their documents but I didn't learn anything. I can see how I could just add this code to the /flash/boot.py to perform this operation, an...