Search found 166 matches

by MostlyHarmless
Sat Nov 30, 2019 2:37 pm
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

This whole thing seems to be an old issue . What I don't understand is that this commit seems to have fixed it in some cases. But that code is enabling the pin and driving it actively high. If I remove that very macro and let the dht driver fall back to the regular mp_hal_pin_od_high() macro and thu...
by MostlyHarmless
Sat Nov 30, 2019 4:58 am
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

Expecting a couple 8266s in the mail tomorrow, so at least I will be able to test these changes with two different chips. Either I am doing something stupid, the modules I got today are crap or the ESP8266 port is somehow broken in the OPEN_DRAIN department. I can't get the dht module to work with ...
by MostlyHarmless
Thu Nov 28, 2019 10:41 pm
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

Expecting a couple 8266s in the mail tomorrow, so at least I will be able to test these changes with two different chips.
by MostlyHarmless
Thu Nov 28, 2019 3:46 pm
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

Specified sampling rate (0.5Hz or 2 seconds). I guess you can test and confirm actual sampling rate, by observing the rate of change in readings? Did as suggested and am as clueless as before what that sampling rate is really supposed to mean. Test setup was as before now toggling the interval of r...
by MostlyHarmless
Wed Nov 27, 2019 6:53 pm
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

... The improved (still backwards compatible) API should be able to perform both, the initial delay (250ms default) and the start pulse (18ms) by sleeping via uasyncio's sleep_ms(). Did some more testing/hacking with uasyncio and it turns out that handling the 18ms "start pulse" delay async isn't r...
by MostlyHarmless
Wed Nov 27, 2019 2:39 am
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

Reading the code again, the line should be in high state anyway once the DHT is done sending. I'll verify that though. Verified. I removed the lines that do mp_hal_pin_od_high_dht(pin); mp_hal_delay_ms(250); then ran while True: try: d.measure() print("Temp.: {0:5.1f}".format(d.temperature())) exce...
by MostlyHarmless
Wed Nov 27, 2019 1:37 am
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Re: Question about the dht module (and maybe some more)

People seem to say stuff like "The sensors claim to not like being read more than every 250 ms." but I can't find any definitive documentation or explanation for this. The documentation I found says that the accuracy goes down if polled faster than every 2 seconds for the DHT22. I don't know what's...
by MostlyHarmless
Tue Nov 26, 2019 10:17 pm
Forum: Development of MicroPython
Topic: Question about the dht module (and maybe some more)
Replies: 15
Views: 10038

Question about the dht module (and maybe some more)

Disclaimer: I am relatively new to the ESP32 and Micropython. I am familiar with microcontrollers in general (did some hobby tasks with MicroChip PICs in C) and know my way around circuits in general. I am trying to learn my way around the Micropython code base the way I usually do it in a new envir...
by MostlyHarmless
Tue Nov 26, 2019 5:00 pm
Forum: General Discussion and Questions
Topic: Whats this all about?
Replies: 5
Views: 2729

Re: Whats this all about?

Also given the fact that you are obviously converting Celsius to Fahrenheit, I wouldn't worry too much about the loss of accuracy in the calculations. Am I assuming right that you are experimenting with a DHT22 temperature and humidity sensor? If so, that thing only has a specified accuracy of +/- 0...
by MostlyHarmless
Tue Nov 26, 2019 3:16 pm
Forum: Development of MicroPython
Topic: Micropython Build Environment for ESP32 in a Docker Container
Replies: 11
Views: 14207

Micropython Build Environment for ESP32 in a Docker Container

Following up on a conversation in another thread I created an example demonstrating how to install the ESP32 tool chain and use it inside of a Docker container. https://github.com/wieck/micropython-esp32-devel The same can certainly be done for other chip types, but so far I only have ESP32s running...