Search found 59 matches

by bulletmark
Mon Sep 05, 2022 11:38 pm
Forum: Programs, Libraries and Tools
Topic: Can I read enviromenz variables?
Replies: 3
Views: 23811

Re: Can I read enviromenz variables?

uraich wrote:
Mon Sep 05, 2022 1:40 pm
Hi,
I would need to figure out the user's home directory on the unix port. So... I could try to find out what $HOME corresponds to. Can this be done in micropython?
Think about how you would do this in ordinary Python and always try that first. I.e. exactly as posted above.
by bulletmark
Thu Aug 25, 2022 3:38 am
Forum: Programs, Libraries and Tools
Topic: Anyone using python websockets to connect to WebREPL?
Replies: 6
Views: 29021

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.
by bulletmark
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: 25170

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.
by bulletmark
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: 11258

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

mattyt wrote:
Wed Aug 17, 2022 1:57 am
Adding wireless connectivity to mpremote has been discussed and is likely to happen sooner rather than later...
@mattyr, I'd like to read more about this so can you please point me to where this has been discussed?
by bulletmark
Sun Jul 31, 2022 11:21 pm
Forum: ESP32 boards
Topic: Triple Quoted Comments (Strings)
Replies: 3
Views: 2718

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...
by bulletmark
Thu Jul 28, 2022 12:01 am
Forum: ESP32 boards
Topic: machine.WDT does not appear to work [Sorted]
Replies: 14
Views: 8803

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`.
by bulletmark
Wed Jul 13, 2022 10:44 pm
Forum: General Discussion and Questions
Topic: How to enable mDNS?
Replies: 6
Views: 5122

Re: How to enable mDNS?

scruss wrote:
Wed Jul 13, 2022 9:18 pm
machine is usually imported by default, seemingly
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
by bulletmark
Thu Jun 30, 2022 11:49 am
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 9302

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)`.