Search found 121 matches

by Christian Walther
Fri Sep 18, 2020 5:53 pm
Forum: General Discussion and Questions
Topic: Filesystem on Esp32
Replies: 1
Views: 137

Re: Filesystem on Esp32

Cannot confirm. MPY: soft reboot Started webrepl in normal mode MicroPython v1.13 on 2020-09-02; TinyPICO with ESP32-PICO-D4 Type "help()" for more information. >>> import sys >>> sys.path ['', '/lib'] >>> with open('boot.py', 'r') as f: print(f.read()) ... # This file is executed on every boot (inc...
by Christian Walther
Sun Sep 06, 2020 6:53 pm
Forum: Development of MicroPython
Topic: Native C module: accessing objects. [SOLVED]
Replies: 27
Views: 1738

Re: Native C module: accessing objects

stijn, I think that’s what I was suggesting, or am I misunderstanding you? since framebuf is itself a native module, you can simply link against it That doesn’t work because the required functions are all static and not accessible to the linker. You’d need to use a modified version of the module wit...
by Christian Walther
Sat Sep 05, 2020 2:00 pm
Forum: Development of MicroPython
Topic: Native C module: accessing objects. [SOLVED]
Replies: 27
Views: 1738

Re: Native C module: accessing objects

I have never done any of this, so I’m guessing here, but what I gather from looking at the code is: The setpixel function you quote is an implementation detail of the framebuf module, you can’t call it from outside (not even in C code that is part of the core). It is not part of the API of the Frame...
by Christian Walther
Fri Sep 04, 2020 12:00 pm
Forum: General Discussion and Questions
Topic: MPY DeepSleep and power consumption
Replies: 8
Views: 427

Re: MPY DeepSleep and power consumption

I suspect this is not a software issue. Are you sure that it’s the ESP32 that is drawing that much power and not something else on your development board? (I’m not familiar with it, so I can’t tell.) If trying another (somewhat more expensive) board is an option, I know that the TinyPICO is optimize...
by Christian Walther
Mon Jul 20, 2020 8:47 pm
Forum: Programs, Libraries and Tools
Topic: ujson utf8 content
Replies: 1
Views: 232

Re: ujson utf8 content

This looks correct to me. Can you explain what your problem/question is? If you were expecting something different, what is it? (In case it helps, \xc1 = \u00c1 in a string literal is the character with Unicode code point 0xc1, LATIN CAPITAL LETTER A WITH ACUTE, and \xc3\x81 in a bytes literal is th...
by Christian Walther
Wed Jul 08, 2020 5:43 pm
Forum: ESP8266 boards
Topic: main.py does not run automatically
Replies: 6
Views: 528

Re: main.py does not run automatically

No (unless you use some kind of external UART-to-WiFi bridge). So that leaves the second option (adding a delay). Or use something other than console output to check if your script runs, e.g. blink an LED or write to the filesystem.
by Christian Walther
Tue Jul 07, 2020 9:09 pm
Forum: ESP8266 boards
Topic: main.py does not run automatically
Replies: 6
Views: 528

Re: main.py does not run automatically

My guess is that it does run, but by the time you connect again, you have missed the output already. Try working with a serial connection (which, unlike WebREPL, isn’t disconnected at reset) or adding some delay into the script so you can catch it before it’s done.
by Christian Walther
Mon Jul 06, 2020 9:08 pm
Forum: General Discussion and Questions
Topic: Problem trying to write variable as bytes
Replies: 1
Views: 226

Re: Problem trying to write variable as bytes

\x34 , or as a Python literal '\\x34' , is a string of four characters. Converting it to bytes using UTF-8 gives you a bytes of four bytes, 0x5C 0x78 0x33 0x34, or as a Python literal b'\\x34' . print() outputs bytes in the literal form. The extra \ there comes from the representation as a literal,...
by Christian Walther
Sun Jul 05, 2020 10:20 pm
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 876

Re: PIN latch functionality for ESP32

Is this related to the Pin.PULL_HOLD flag (of which I’m not entirely sure what it does)?