Search found 113 matches

by Christian Walther
Fri May 22, 2020 4:45 pm
Forum: ESP8266 boards
Topic: Who can confirm deep sleep alarm wake on D1 mini boards
Replies: 4
Views: 447

Re: Who can confirm deep sleep alarm wake on D1 mini boards

That was just me trying to figure out / guess why the MCU would (half-)reset even without the connection. The capacitor is not one I am placing, but must be one that’s on the board (or the module) already. I can’t tell the exact connections from looking at the board because the module obscures the t...
by Christian Walther
Fri May 22, 2020 9:17 am
Forum: ESP8266 boards
Topic: Who can confirm deep sleep alarm wake on D1 mini boards
Replies: 4
Views: 447

Re: Who can confirm deep sleep alarm wake on D1 mini boards

I have two Wemos D1 mini v2.1.0 here, to my knowledge original ones from Wemos. They have some ESP-12 module with “WeMos” on the metal shield. They work properly as far as I can tell: When GPIO16 and RST are externally connected, waking from deep sleep using the RTC works as expected (using the code...
by Christian Walther
Sun May 17, 2020 5:16 pm
Forum: ESP8266 boards
Topic: Problem with Newline if i sending textfiles with udp-socket
Replies: 5
Views: 306

Re: Problem with Newline if i sending textfiles with udp-socket

Are you sure you quoted that debug output exactly? The (lack of) quotes and parentheses look suspicious. What I get is something like (Debug): received: b'Hello\r\nWorld' from: ('192.168.0.101', 58309) Note the b , which indicates that this is a bytes , not a string. print() prints those as their re...
by Christian Walther
Sat May 02, 2020 2:07 pm
Forum: General Discussion and Questions
Topic: March/April MicroPython news roundup
Replies: 1
Views: 195

Re: March/April MicroPython news roundup

Very informative, thank you! And I’m happy to see PicoPew mentioned! :D
by Christian Walther
Wed Apr 29, 2020 8:52 pm
Forum: ESP8266 boards
Topic: [SOLVED] General question regarding GPIOs of Wemos D1 mini
Replies: 3
Views: 371

Re: General question regarding GPIOs of Wemos D1 mini

D3 is GPIO 0 which is one of the bootstrapping pins of the ESP8266. It must be pulled high in order to boot from flash rather than from the internal bootloader. On the D1 Mini, according to the schematic , that is achieved by a 12 kΩ resistor to +3V3 (R10, right center). That’s where your LED curren...
by Christian Walther
Tue Apr 28, 2020 1:12 pm
Forum: Programs, Libraries and Tools
Topic: I can’t interact with micropython by Popen
Replies: 10
Views: 677

Re: I can’t interact with micropython by Popen

And I don't know how to tell the redirection is from '<' or from Popen. Why would you need to? My suggestion is once you set -i flag, it will always call do_repl(). That much is common between dhylands’ solution and yours. What’s different is what happens when you don’t set the -i flag. And if you ...
by Christian Walther
Mon Apr 27, 2020 5:33 pm
Forum: Programs, Libraries and Tools
Topic: I can’t interact with micropython by Popen
Replies: 10
Views: 677

Re: I can’t interact with micropython by Popen

And "-i flag was specified" is exactly the variable inspect used one line above, so the changed line is

Code: Select all

if (isatty(0) || inspect) {
You’ll probably also want to adjust the print_help() text. (CPython’s says “forces a prompt even if stdin does not appear to be a terminal”.)
by Christian Walther
Fri Apr 24, 2020 7:17 am
Forum: Programs, Libraries and Tools
Topic: I can’t interact with micropython by Popen
Replies: 10
Views: 677

Re: I can’t interact with micropython by Popen

This is CPython. Apparently micropython does not run the REPL when stdin is not from a terminal, which means that input is only compiled at EOF, not line-wise, you need to use print() to see output. This works for me: >>> proc = subprocess.Popen(['./micropython', '-i'], stdin=subprocess.PIPE, stdout...
by Christian Walther
Thu Apr 16, 2020 5:59 am
Forum: General Discussion and Questions
Topic: A question about umqtt - How to react to the lastest message under the subcribed topic? Thanks
Replies: 4
Views: 215

Re: A question about umqtt - How to react to the lastest message under the subcribed topic? Thanks

OK, I think I understand what you mean. You’re sending multiple messages during the 1 second where the client is not listening and only want the last of them acted upon. Well, that’s just not how MQTT works. If you insist on using MQTT, then you’ll have to implement that behavior in the client, as y...
by Christian Walther
Wed Apr 15, 2020 7:45 pm
Forum: General Discussion and Questions
Topic: A question about umqtt - How to react to the lastest message under the subcribed topic? Thanks
Replies: 4
Views: 215

Re: A question about umqtt - How to react to the lastest message under the subcribed topic? Thanks

I see nothing obviously wrong with this code (other than that it’s umqtt.simple , not umqtt_simple ) and it works as intended for me, reacting once to each incoming message. Have you tried connecting another client (such as mosquitto_sub ) to see if it’s not the server that resends old messages? How...