Think about how you would do this in ordinary Python and always try that first. I.e. exactly as posted above.
Search found 59 matches
- Mon Sep 05, 2022 11:38 pm
- Forum: Programs, Libraries and Tools
- Topic: Can I read enviromenz variables?
- Replies: 3
- Views: 23612
Re: Can I read enviromenz variables?
- Fri Aug 26, 2022 3:29 am
- Forum: Programs, Libraries and Tools
- Topic: Anyone using python websockets to connect to WebREPL?
- Replies: 6
- Views: 28782
- Thu Aug 25, 2022 3:38 am
- Forum: Programs, Libraries and Tools
- Topic: Anyone using python websockets to connect to WebREPL?
- Replies: 6
- Views: 28782
Re: Anyone using python websockets to connect to WebREPL?
Not sure what you are asking but I have implemented a REPL mode although I don't support raw (Ctrl+A) or paste (Ctrl+E) modes. Can't give a simple example but nothing tricky stands out. I just set a message handler and process each received string.
- Thu Aug 25, 2022 2:55 am
- Forum: Programs, Libraries and Tools
- Topic: Anyone using python websockets to connect to WebREPL?
- Replies: 6
- Views: 28782
Re: Anyone using python websockets to connect to WebREPL?
I use websockets-client which works for me with ESP32's.
- Wed Aug 24, 2022 11:07 pm
- Forum: Programs, Libraries and Tools
- Topic: Some use cases and small talk for the mpremote tool
- Replies: 5
- Views: 24921
Re: Some use cases and small talk for the mpremote tool
Hmm, that PR is going to stuff up the semantics of my mpr wrapper. Did not anticipate that so may have to add a specific device to device copy command.
- Wed Aug 17, 2022 2:33 am
- Forum: Programs, Libraries and Tools
- Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
- Replies: 15
- Views: 11240
Re: Are there tools like 'ampy' and 'there' that support websocket connections?
@mattyr, I'd like to read more about this so can you please point me to where this has been discussed?
- Sun Jul 31, 2022 11:21 pm
- Forum: ESP32 boards
- Topic: Triple Quoted Comments (Strings)
- Replies: 3
- Views: 2704
Re: Triple Quoted Comments (Strings)
The question appears somewhat confused though. All "Unassigned" strings are ignored in Python, not just MicroPython, so perhaps the question is intended to be asking specifically about docstrings? Using mpy-cross shows that docstrings are ignored in MicroPython, but obviously not in Python (unless y...
- Thu Jul 28, 2022 12:01 am
- Forum: ESP32 boards
- Topic: machine.WDT does not appear to work [Sorted]
- Replies: 14
- Views: 8795
Re: machine.WDT does not appear to work
@davef, It's likely not needed. I doubt Roberth mean't "global" as a keyword here. I suspect he mean't you need to ensure the wdt() instance is a singleton. I.e. in the function where you have wdt.feed() then the wdt instance does not need to be `global wdt`.
- Wed Jul 13, 2022 10:44 pm
- Forum: General Discussion and Questions
- Topic: How to enable mDNS?
- Replies: 6
- Views: 5119
Re: How to enable mDNS?
On a Raspberry Pi Pico W it might, but not everywhere. For instance, on a ESP32:
Code: Select all
>>> machine.unique_id()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'machine' isn't defined
- Thu Jun 30, 2022 11:49 am
- Forum: Programs, Libraries and Tools
- Topic: Initialize watchdog timer from function
- Replies: 14
- Views: 9289
Re: Initialize watchdog timer from function
The error you report here shows that `wdt.feed()` is being called at startup *before* `wdt = WDT(timeout=120_000)`.