Search found 52 matches

by eradicatore
Sun Oct 13, 2019 10:12 pm
Forum: MicroPython pyboard
Topic: What is lowest consumption of D-series?
Replies: 5
Views: 4091

What is lowest consumption of D-series?

Hi, I see this nice chart of the pyboard v1.1 here: https://store.micropython.org/pyb-features which gives power consumption data. I can't seem to find anything on the d-series though? There is some mention of 50uA in the command sheet here but I feel that's out of date perhaps and more just general...
by eradicatore
Sun Apr 21, 2019 2:40 pm
Forum: ESP8266 boards
Topic: How to use main.py to deploy my code
Replies: 17
Views: 33281

Re: How to use main.py to deploy my code

Before making code run at power on, it's best to debug it at the REPL first. Say you have a module mymodule.py, created on a PC and containing a function run(). Copy the module to the ESP using WebRepl or otherwise, then at the REPL issue import mymodule mymodule.run() Once you have the module runn...
by eradicatore
Wed Mar 13, 2019 6:29 pm
Forum: ESP8266 boards
Topic: OSError: [Errno 103] ECONNABORTED using urequests
Replies: 7
Views: 12838

Re: OSError: [Errno 103] ECONNABORTED using urequests

Ok, Just learned from the other thread a better solution: Thanks for this. I ended up going a different route, but I'll give this a try. The solution I found was to realise urequests.post() returns a response, so response = urequests.post(url) followed by response.close() appears to handle the clean...
by eradicatore
Sat Mar 09, 2019 3:03 pm
Forum: ESP8266 boards
Topic: OSError: [Errno 103] ECONNABORTED using urequests
Replies: 7
Views: 12838

Re: OSError: [Errno 103] ECONNABORTED using urequests

Ok, garbage collection solved it. Now I can press the button and it works every time! I may tweak the delays to get as tight as possible. Would be nice to query the urequests if busy instead of just a crude delay, but hey... Here's the new loop at the end: gc.enable() while True: time.sleep_ms(250) ...
by eradicatore
Sat Mar 09, 2019 2:16 pm
Forum: ESP8266 boards
Topic: OSError: [Errno 103] ECONNABORTED using urequests
Replies: 7
Views: 12838

Re: OSError: [Errno 103] ECONNABORTED using urequests

Hi, Thanks for this question! I'm just hitting the exact same failure. My code is tiny simple button press handling to trigger posts of json to control a music player, and even with some delays I hit this same ECONNABORTED. This fellow has the same issues it seems: https://stackoverflow.com/question...
by eradicatore
Fri Nov 17, 2017 8:31 pm
Forum: ESP8266 boards
Topic: Want to upload a file to slack (files.upload api)
Replies: 1
Views: 4686

Want to upload a file to slack (files.upload api)

Hi, So in normal python, I'm able to upload a file just fine to slack. here is the code: my_file = { 'file' : ('/tmp/myfile.pdf', open('/tmp/myfile.pdf', 'rb'), 'pdf') } payload={ "filename":"myfile.pdf", "token":token, "channels":['#random'], } r = requests.post("https://slack.com/api/files.upload"...
by eradicatore
Thu Nov 16, 2017 8:21 pm
Forum: ESP8266 boards
Topic: OSError: scan failed
Replies: 6
Views: 5714

Re: OSError: scan failed

I still can't get the try/except to work around this failure when there are no wifi scan results. Does anyone else see this failure if there are zero ap's visible when you try to scan? Why would code like this not work? try: scan_results = wifi.scan() except: ## for some odd reason OSERROR here mean...
by eradicatore
Tue Oct 03, 2017 7:59 pm
Forum: ESP8266 boards
Topic: OSError: scan failed
Replies: 6
Views: 5714

Re: OSError: scan failed

Hi, Were you able to confirm this happens if the scan results in no networks found? I was hitting OS error on scans in one location last night very repeatedly, so I would assume you're right. But I just expected the documentation to also mention this pretty interesting way of reporting nothing found...
by eradicatore
Tue Jul 25, 2017 2:06 am
Forum: Programs, Libraries and Tools
Topic: urlencode
Replies: 3
Views: 7552

Re: urlencode

Hi,
Sorry, dumb question. How/what do you import here? I tried "import urllib" which works but then help(urllib) shows no methods?
by eradicatore
Thu Jul 20, 2017 2:17 pm
Forum: ESP8266 boards
Topic: Credentials sticking around?
Replies: 7
Views: 7134

Re: Credentials sticking around?

Does the "erase_flash" command in the nodemcu esp8266 "getting started" instructions erase the esp8266's flash or just the node MCU? Does that wipe these last 5 or 6 credentials?