Search found 6 matches

by tiny
Sun Jan 05, 2020 3:57 am
Forum: General Discussion and Questions
Topic: OTA Firmware update with pure uPy script possible?
Replies: 10
Views: 6257

Re: OTA Firmware update with pure uPy script possible?

Im dreaming way above my skill level but - what about making a little bios/hypervisor kind of setup. A smaller partition whose sole job it is to boot the partition you plan to write and rewrite with OTA. This little section would also store your reflashing script. Is that feasible?
by tiny
Sat Jan 04, 2020 12:49 am
Forum: General Discussion and Questions
Topic: Remove directory that is not empty?
Replies: 8
Views: 5946

Re: Remove directory that is not empty?

(Edit, it occurs to me now how bad it is to name my func the same as os modules'. Especially when trying to help/suggest code to others. changes that to 'rmvdir'. ) os.ilistdir is interesting, I didnt know it was a thing until your post. Funny that uPy has both it, and the usual listdir. The help s...
by tiny
Fri Jan 03, 2020 8:37 am
Forum: General Discussion and Questions
Topic: hackable consumer electronic products with microppython ?!?
Replies: 13
Views: 9880

Re: hackable consumer electronic products with ESP32 ?!?

I was actually just poking around on hackaday looking at the assorted consumer-tech mods people are doing. I love this (re purposing / upgrading 'old' tech). There's so much its hard to know where to begin. But for the ESP32 specifically I couldn't find much consumer elec that it was even used in. B...
by tiny
Fri Jan 03, 2020 8:29 am
Forum: General Discussion and Questions
Topic: Remove directory that is not empty?
Replies: 8
Views: 5946

Re: Remove directory that is not empty?

Code: Select all

import os
def rmdir(dir):
    for i in os.listdir(dir):
        os.remove('{}/{}'.format(dir,i))
    os.rmdir(dir)
by tiny
Thu Jan 02, 2020 4:36 pm
Forum: General Discussion and Questions
Topic: WebRepl input blocked by loop with utime.sleep()?
Replies: 7
Views: 4891

Re: WebRepl input blocked by loop with utime.sleep()?

Wow, very cool pythoncoder/peterhinch! Excellent explanation. Honored you took time to respond. Have perused your github with relish :) Vars pass value, structures pass reference. This and many other intricacies. I enjoy them all. Thanks again for your input. 8-)
by tiny
Wed Jan 01, 2020 3:24 pm
Forum: General Discussion and Questions
Topic: WebRepl input blocked by loop with utime.sleep()?
Replies: 7
Views: 4891

Re: WebRepl input blocked by loop with utime.sleep()?

I'm just beginning to explore usage of _thread in micropython, actually coming out of reading this thread. Took a bit of sleuthing to create a 'kill pill' structure that worked, so I thought I'd share it here. #full-on working example of a background thread: from time import sleep import _thread def...