Search found 781 matches

by kevinkk525
Mon Sep 28, 2020 9:17 pm
Forum: ESP32 boards
Topic: ADC voltage coversion accuray error
Replies: 3
Views: 257

Re: ADC voltage coversion accuray error

The Esp32 adc is not very accurate and not linear at the edges but after some calibration in code it worked rather acceptable in my case. For me this worked best: adc/4095*3.4 + 0.112 So the maximum voltage at 3.4V and an offset of 0.112V. It will not give you good results at the edges (close to 0V ...
by kevinkk525
Sat Sep 26, 2020 3:28 pm
Forum: ESP32 boards
Topic: Handling Exceptions when Using Uasyncio v3
Replies: 6
Views: 805

Re: Handling Exceptions when Using Uasyncio v3

See https://github.com/micropython/micropython/pull/5796 on how to handle exceptions in micropython uasyncio and CPython asyncio.
by kevinkk525
Thu Sep 24, 2020 12:30 pm
Forum: General Discussion and Questions
Topic: Error messages via mqtt
Replies: 7
Views: 871

Re: Error messages via mqtt

good luck!
nice design :D
by kevinkk525
Thu Sep 24, 2020 10:04 am
Forum: General Discussion and Questions
Topic: Error messages via mqtt
Replies: 7
Views: 871

Re: Error messages via mqtt

I put time.sleep_ms(100) before executing any code, lets the esp background tasks settle, maybe that helps a bit, maybe not :D In your code I can't see a mqtt client but I see that you are using a synchronous programming approach (using utime.sleep). Maybe that is a source of problems too because lo...
by kevinkk525
Thu Sep 24, 2020 7:12 am
Forum: General Discussion and Questions
Topic: Error messages via mqtt
Replies: 7
Views: 871

Re: Error messages via mqtt

Then I guess you should find out why your mqtt connection breaks this often. I never have any connection issues except for the occasional wifi outage that triggers a reconnect but those take less than 10 seconds so I never actually lose any mqtt messages even though I send most of them with a timeou...
by kevinkk525
Wed Sep 23, 2020 7:16 pm
Forum: General Discussion and Questions
Topic: Error messages via mqtt
Replies: 7
Views: 871

Re: Error messages via mqtt

In my project I send log messages over mqtt like this: https://github.com/kevinkk525/pysmartnode/blob/master/pysmartnode/logging/logging_full.py Every log message will be sent directly over mqtt, no files on the device itself, but it could easily be changed to also write log files on the device itse...
by kevinkk525
Tue Sep 15, 2020 7:40 am
Forum: Programs, Libraries and Tools
Topic: MQBoard - Micro-Framework for MicroPython Boards Managed via MQTT
Replies: 10
Views: 1905

Re: MQBoard - Micro-Framework for MicroPython Boards Managed via MQTT

I had a closer look again at your project because I would like to get some of the functionality into my project (like mqtt-repl and mqtt-client) but I realized that you use your own micropython fork with multiple changes and I don't want to use another fork that is even specific for esp32 because I ...
by kevinkk525
Mon Sep 14, 2020 12:57 pm
Forum: ESP8266 boards
Topic: ESP8266 and JSN-SR04T-2.0 inconsistent results
Replies: 2
Views: 416

Re: ESP8266 and JSN-SR04T-2.0 inconsistent results

I wrote a module for the hcsr04 which is rather simila to the JSN-SR04T so the same problems probably apply. I found that a single measurement is often not accurate enough or results in a reading error or way to long/short distance. So I take multiple measurements (configureable), discard the extrem...
by kevinkk525
Thu Sep 10, 2020 7:25 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 28
Views: 5086

Re: PMS5003 air quality sensor library

oh I found the problem.. I thought Stream would be exposed in uasyncio but only StreamReader and StreamWriter are (which are all the same actually)..
Fixed it now, thanks for reporting!
by kevinkk525
Wed Sep 09, 2020 9:13 pm
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 28
Views: 5086

Re: PMS5003 air quality sensor library

I tried with the new firmware 1.13 which contain uasyncio3... My return: "File "uasyncio/__init__.py", line 1, in __getattr__ AttributeError: Stream" That's weird. Looks like firmware 1.13 doesn't include uasyncio version 3 on the esp8266: https://github.com/micropython/micropython/issues/6410 That...