Search found 31 matches

by oserror
Thu Jun 27, 2019 7:49 pm
Forum: ESP8266 boards
Topic: Reading voltage through A0 pin
Replies: 6
Views: 218

Re: Reading voltage through A0 pin

Hi Robert, I'm using your BME280 library and it works great! By default, it uses Forced mode, correct? It takes a sample and then goes to 'sleep'? I looked at one of your calculations and that seems to be the case. I've had just the basic Wemos and BME280 circuit on my breadboard for a couple of wee...
by oserror
Thu Jun 27, 2019 3:59 pm
Forum: ESP8266 boards
Topic: Reading voltage through A0 pin
Replies: 6
Views: 218

Re: Reading voltage through A0 pin

Robert, thanks for your detailed and quick reply.

I made a dumb error. I looked again at the resistor pack and I had 220 Ohm instead of 220 KOhm. I went to Radio Shack since I posted, managed to get the old one off (no small feat for me!) and I'm back in business.

Case closed!
by oserror
Thu Jun 27, 2019 11:48 am
Forum: ESP8266 boards
Topic: Reading voltage through A0 pin
Replies: 6
Views: 218

Re: Reading voltage through A0 pin

Could it be that the brand new battery is supplying a high voltage, maybe higher than 5V? It is an 18650 going through a TP4056. The 220k resistor is connected to the output voltage of the TP4056 and goes to pin A0 (as well as going to VCC) of the Wemos. Everything else is working -- I just always w...
by oserror
Thu Jun 27, 2019 10:54 am
Forum: ESP8266 boards
Topic: Reading voltage through A0 pin
Replies: 6
Views: 218

Reading voltage through A0 pin

Just yesterday, I finished making this project: https://www.instructables.com/id/Solar-Powered-WiFi-Weather-Station-V20/ I rewrote the code in MicroPython and I'm fairly pleased with the results. What does not seem to work is the voltage detection. There is a 220k resistor between the battery and th...
by oserror
Thu Jun 20, 2019 7:06 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 454

Re: Need help freeing memory from unused modules

Okay, one thing I'm going to try is to disconnect it from my USB3 hub on my monitor. I had an issue with a Wemos D1 mini with a PIR sensor sending the state of the sensor to my Home Assistant software. Periodically, it would crash. I solved the problem by connecting the device to a power supply, not...
by oserror
Thu Jun 20, 2019 1:11 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 454

Re: Need help freeing memory from unused modules

I can try that. I am in a little over my head. :) What sort of things would I be looking for there? When should I run that method? When the board is unstable? I ran the code overnight on my breadboard and there was no error. It ran for about 12 hours. I do a small check by writing the time to a file...
by oserror
Thu Jun 20, 2019 1:02 am
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 454

Re: Need help freeing memory from unused modules

I let my program run for a couple of weeks while some of the parts from China arrived in the mail. I seem to have enough memory to run the blinklib.py library and do a ssl request to Thingspeak. Most of the time. My program runs for about 10 seconds and goes into deep sleep for about 10 minutes, the...
by oserror
Tue Jun 11, 2019 5:03 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 454

Re: Need help freeing memory from unused modules

I worked on this for a few days. I managed to free up a couple of kilobytes of RAM by doing manual garbage collection and further breaking down things into separate modules. I also tried using urllib.urequest.urlopen() using ssl. My program runs every 10 minutes, doing a deep sleep between cycles. I...
by oserror
Thu Jun 06, 2019 10:27 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 454

Re: Need help freeing memory from unused modules

Thanks a lot. That makes sense.

I'll have to be careful when handling large variables/objects. I have been lazy working on modern-day machines where one can be sloppy.

I'm just glad I got the ssl working, albeit a tight squeeze! I'll see what else I can clean up in my code.
by oserror
Thu Jun 06, 2019 9:33 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 454

Re: Need help freeing memory from unused modules

Okay, I got it working. I am not 100% on why this works. for i, value in enumerate(result): res = urequests.put(url='%s/%s/update/V%d' % (blynk_host, blynk_auth, i), json=['%s' % value]) if res.status_code != 200: print('Error updating pin V%d: %s' % (i, res.text)) else: print('Updated pin V%d' % i)...