Search found 58 matches

by VladVons
Mon Feb 22, 2021 7:35 pm
Forum: ESP32 boards
Topic: ESP32 and LilyGo TTGO T Call
Replies: 20
Views: 4084

Re: ESP32 and LilyGo TTGO T Call

Hello kinno I have got such device and also good micropython skill. https://www.aliexpress.com/item/4000832675119.html Can you share your source code or pair examles/subject links as start point to serve GSM, GPS modules ? I have a ton of code written for this. Anything in particular you want? I wou...
by VladVons
Fri Feb 19, 2021 3:38 pm
Forum: ESP8266 boards
Topic: random.randint() not exists in esp8266 ?
Replies: 4
Views: 309

Re: random.randint() not exists in esp8266 ?

thanks Christian
got it
by VladVons
Fri Feb 19, 2021 1:04 pm
Forum: ESP8266 boards
Topic: random.randint() not exists in esp8266 ?
Replies: 4
Views: 309

random.randint() not exists in esp8266 ?

in ESP32 there is a random.randint() function
in ESP866 no.

how to get any randomize value in ESP866 ?
by VladVons
Sun Feb 14, 2021 2:52 pm
Forum: ESP8266 boards
Topic: [SOLVED] async read keypressed in terminal
Replies: 5
Views: 964

Re: async read keypressed in terminal

Peter, no theme in internet Hope I`m on a right way with select.poll() class TKbdTerm(): def __init__(self): self.Poller = select.poll() self.Poller.register(sys.stdin, select.POLLIN) def GetChr(self): for s, ev in self.Poller.poll(500): return s.read(1) async def Input(self, aPrompt = ''): R = '' w...
by VladVons
Thu Feb 04, 2021 8:14 pm
Forum: General Discussion and Questions
Topic: [SOLVED] Multipart files upload. File length?
Replies: 2
Views: 185

Re: Multipart files upload. How to get the file length or its data?

thanks jimmo my async multiple files upload implementation import uasyncio as asyncio class TMulUpload(): @staticmethod def ParseRec(aStr: str) -> dict: Res = {} for Item in aStr.split(';'): Arr = Item.split('=') if (len(Arr) == 2): Res[Arr[0].strip().lower()] = Arr[1].strip() else: Res[Item.strip()...
by VladVons
Wed Feb 03, 2021 1:51 pm
Forum: General Discussion and Questions
Topic: [SOLVED] Multipart files upload. File length?
Replies: 2
Views: 185

[SOLVED] Multipart files upload. File length?

i upload two files and dont know how to get thier context length and data should i search in POST every time data boundary ? ----WebKitFormBoundarywjRojsBoPY7GpAWu is there some 'BOUNDARY-content-length' like a HTTP head content-length ? there are many heavy weight python libraries that handles file...
by VladVons
Wed Feb 03, 2021 8:59 am
Forum: General Discussion and Questions
Topic: url decode
Replies: 4
Views: 9521

Re: url decode

def UrlPercent(aData: bytearray) -> str: Bits = aData.split(b'%') Arr = [Bits[0]] for Item in Bits[1:]: Code = Item[:2] Char = bytes([int(Code, 16)]) Arr.append(Char) Arr.append(Item[2:].replace(b'+', b' ')) Res = b''.join(Arr) return Res.decode('utf-8') see also https://github.com/micropython/micr...
by VladVons
Mon Feb 01, 2021 2:16 pm
Forum: ESP32 boards
Topic: microwebsrv2 : not enought memory !
Replies: 3
Views: 289

Re: microwebsrv2 : not enought memory !

indeed microwebsrv2 is not a micro. it has over 4000 lines of source code. on esp32 should work, but memory info needed to say something. perhapse your download file is too big to fit in memory and server loads it into memory instead of splitting into portions of streaming. Memory usage: import gc g...
by VladVons
Tue Jan 26, 2021 10:36 am
Forum: ESP8266 boards
Topic: [SOLVED] async read keypressed in terminal
Replies: 5
Views: 964

Re: async read keypressed in terminal

async non blocking keyboard input example import sys import uasyncio as asyncio import select def GetInputChr(): R = '' while sys.stdin in select.select([sys.stdin], [], [], 0)[0]: R = sys.stdin.read(1) return R async def GetInputStr(aPrompt = ''): R = '' while True: K = GetInputChr() if (K): if (or...
by VladVons
Mon Jan 25, 2021 10:11 am
Forum: ESP32 boards
Topic: What the best IDE for ESP32 micro python developing ?
Replies: 8
Views: 835

Re: What the best IDE for ESP32 micro python developing ?

Everybody use linux + nano editor + command line for uploading as I do ? :) so, I share own method add to the ~/bashrc EOF string source ~/esp_upload.sh Hint: dont forget logout/logit to take effect esp_upload.sh #!/bin/bash #VladVons, 2021.01.25 #add to ~/bashrc EOF source ~/esp_upload.sh and logou...