Search found 35 matches

by cgglzpy
Fri Jun 12, 2020 12:26 pm
Forum: ESP8266 boards
Topic: Get large log files from sd card over wifi?
Replies: 3
Views: 186

Re: Get large log files from sd card over wifi?

Hi JonRob, You could try upydev , just follow the instructions in the README and then use sync command , e.g.: $ upydev sync -f logACC_26_6_2019_0_18_42.txt -s sd Note: 1) The SD card should be mounted as 'sd' 2) 20 MB is large so expect at least 2-3 minutes with ideally conditions, or even double w...
by cgglzpy
Fri Apr 10, 2020 4:35 pm
Forum: Programs, Libraries and Tools
Topic: ESP32-targeted alternative to Ampy
Replies: 7
Views: 627

Re: ESP32-targeted alternative to Ampy

Hi AwesomeCronk, you may be interested to have a look at upydev and upydevice , a CLI and a python library which I made to meet these needs.
by cgglzpy
Fri Mar 27, 2020 5:42 pm
Forum: ESP32 boards
Topic: ESP32 can't get ssl working
Replies: 3
Views: 363

Re: ESP32 can't get ssl working

Hi kruthers, I think the socket needs to connect or accept a connection before wrapping in SSL, see examples at Micropython repo micropython-examples-network Also for the keywords: # CPython uses key keyfile/certfile arguments, but MicroPython uses key/cert client_s = ssl.wrap_socket(client_s, serve...
by cgglzpy
Thu Feb 20, 2020 8:26 pm
Forum: ESP32 boards
Topic: receive commands from pc and reply with data
Replies: 7
Views: 532

Re: receive commands from pc and reply with data

Hi aleskeyfedorovich, If you work with jupyter notebooks/ jupyter lab I made a jupyter kernel ( based on previous work jupyter_micropython_kernel and jupyter_micropython_remote ) I created some "magic cell" commands like "%logdata" and "%devplot" to allow exactly this: I have an ESP32 connected to a...
by cgglzpy
Sat Feb 15, 2020 5:49 pm
Forum: General Discussion and Questions
Topic: Remove and Replace Printed characters in serial terminal
Replies: 5
Views: 349

Re: Remove and Replace Printed characters in serial terminal

I don't know if this is the same, but using '\r' and "print(msg, end=' ')" should work. e.g. >> def print_and_clear(msg): ... msg_list = ['This', 'is', 'a', 'message', 'that', 'replaces', 'itself'] ... print(msg, end='') ... time.sleep(1) ... print('\r'+' '*len(msg), end='\r') # This clears previous...
by cgglzpy
Fri Feb 14, 2020 6:08 pm
Forum: ESP32 boards
Topic: socket ssl
Replies: 1
Views: 222

Re: socket ssl

Hi, ke528

Look at this issue in MicroPython repo: https://github.com/micropython/micropython/issues/5543

MicroPython v1.12 stable release should work, so rolling back to last stable version resolves the issue.
by cgglzpy
Thu Feb 06, 2020 3:58 pm
Forum: ESP32 boards
Topic: ADXL345 range setting on micropython
Replies: 3
Views: 302

Re: ADXL345 range setting on micropython

i've insert the suggested lines in the code but nothing happens. Hmm, maybe because of this From the data sheet Page 26 : All data, except that for the ±16 g range, must be clipped to avoid rollover So I think you have to comment or erase the "if x > 32767" lines. Something like this: def xValue(se...
by cgglzpy
Tue Feb 04, 2020 6:38 pm
Forum: ESP32 boards
Topic: ADXL345 range setting on micropython
Replies: 3
Views: 302

Re: ADXL345 range setting on micropython

Hi, You can see this in the data sheet: ADXL345 [Page 26-27] Register 0x31—DATA_FORMAT (Read/Write) --> Range Bits D1-D0 So you need to write to register 0x31 the byte 0x03 which is 0b00000011 (see Table 21) setting bits D1-D0 to 1. In code should be something like: reg_DATA_FORMAT = const(0x31) and...
by cgglzpy
Fri Jan 17, 2020 4:56 pm
Forum: Development of MicroPython
Topic: Tree command for upysh
Replies: 8
Views: 912

Re: Tree command for upysh

Hi, I made a 'display disk usage statistics' / 'du' command too, in case anyone is interested... It's like 'ls' command but size is in 'Human-readable' output, by default do not list hidden files/dirs, it prints also size of dirs and it has an option for the depth level (default 0) e.g. >>> du 8.3 K...
by cgglzpy
Fri Jan 17, 2020 3:33 pm
Forum: General Discussion and Questions
Topic: How to run an mqtt-repl?
Replies: 22
Views: 1950

Re: How to run an mqtt-repl?

That looks good! :) That looks really helpful! I have a couple of questions: - why do you first try to eval and then exec? why not eval(compile(self.rec_msg)) ? - why do you call gc.collect() when there is no output? As I said it was experimental (aka "I have the ideas but I don't know how to implem...