Search found 67 matches
- Sun Jan 17, 2021 3:30 pm
- Forum: ESP32 boards
- Topic: Why UART2 read do not work after hard reset?
- Replies: 10
- Views: 4702
Re: Why UART2 read do not work after hard reset?
Pins 34 - 39 are input only. You can use them for RX but not for TX. So true. I already forgot that. Thank you for heads-up. I re-checked documentation of ESP32 and by the doc UART2 shall also be moved to other pins too https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en....
- Sun Jan 17, 2021 2:06 pm
- Forum: ESP32 boards
- Topic: Why UART2 read do not work after hard reset?
- Replies: 10
- Views: 4702
Re: Why UART2 read do not work after hard reset?
If you still use Pins 16 and 17: on some boards these are used for flash or SPIRAM. Normally the board crashes when you try to use them for other purposes. In your case obviously not. But there may still be a side effect. You could try to use other pins for the UART. I tried UART2 with pins 34 & 35...
- Sun Jan 17, 2021 1:20 pm
- Forum: ESP32 boards
- Topic: Why UART2 read do not work after hard reset?
- Replies: 10
- Views: 4702
Re: Why UART2 read do not work after hard reset?
Update: If boot reason is 1 (power on boot), UART2 does not work. I was able to fix it by: # CO2 sensor co2sensor = MHZ19bCO2(uart=CO2_SENSOR_UART, rxpin=CO2_SENSOR_RX_PIN, txpin=CO2_SENSOR_TX_PIN) if reset_cause() == 1: del co2sensor utime.sleep(5) co2sensor = MHZ19bCO2(uart=CO2_SENSOR_UART, rxpin=...
- Fri Jan 15, 2021 5:02 pm
- Forum: ESP32 boards
- Topic: Why UART2 read do not work after hard reset?
- Replies: 10
- Views: 4702
Why UART2 read do not work after hard reset?
I am reading MH-Z19 CO2 sensor from UART1 (pins 17 and 18) asynchronously, code here: https://github.com/divergentti/airquality/blob/main/esp32/esp32-mhz19-ili9341-touchscreen/MHZ19B.py and in the main.py code https://github.com/divergentti/airquality/blob/main/esp32/esp32-mhz19-ili9341-touchscreen/...
- Fri Jan 15, 2021 8:22 am
- Forum: Drivers for External Components
- Topic: xpt2046
- Replies: 25
- Views: 19366
Re: xpt2046
This saved my day!
I found 1.2 MHz best value in my case. I guess S/NR of the cabling / connectors might have something do with this as well.
- Fri Jan 15, 2021 7:30 am
- Forum: General Discussion and Questions
- Topic: Why hard reset WiFi connection typically fail?
- Replies: 3
- Views: 2816
Re: Why hard reset WiFi connection typically fail?
The only thing that I have come across is " that the WiFi connection persists across soft-reboots not a hard reset". Yours sounds like the opposite! If you do a machine.reset(), say in boot, and let the program run automatically does it also behave like a a hard reset? If i use: from machine import...
- Thu Jan 14, 2021 3:57 pm
- Forum: General Discussion and Questions
- Topic: Why hard reset WiFi connection typically fail?
- Replies: 3
- Views: 2816
Why hard reset WiFi connection typically fail?
I noticed that after every hard reset WiFi connection wont establish correctly, but after soft reboot WiFi works fine. See video. What might cause this? I have it in all my setups, but I have not yet understood why this happens. ESP32 either SMD, DevBoard, esp32-idf4-20200902-v1.13.bin Video https:/...
- Thu Jan 14, 2021 7:44 am
- Forum: ESP32 boards
- Topic: Best driver for ili9341 display
- Replies: 40
- Views: 25980
Re: Best driver for ili9341 display
Hi @Divergentti you might be able to scrape some code and ideas from my air quality project? Similar project - ILI9341 display, particulate sensor, MQTT, uasyncio. Here are some links: Github: https://github.com/miketeachman/micropython-street-sense Hackaday project: https://hackaday.io/project/162...
- Wed Jan 13, 2021 2:01 pm
- Forum: ESP32 boards
- Topic: Best driver for ili9341 display
- Replies: 40
- Views: 25980
Re: Best driver for ili9341 display
I got ILI9341 and touchscreen working. This is very very first draft, started yesterday https://github.com/divergentti/airquality/blob/main/esp32/esp32-mhz19-ili9341-touchscreen/main.py At this moment MH-Z19 CO2 NDIR is updated asynchronously in the backgroud, PMS7003 particle sensor and BME280 will...
- Fri Jan 08, 2021 9:35 am
- Forum: General Discussion and Questions
- Topic: Async main and WebREPL
- Replies: 2
- Views: 1896
Re: Async main and WebREPL
I got this working. I had to change distance measurement loop to use await and add some delay: async def measure_distance_cm(self): try: distance = self.sensor.distance_cm() if distance > 0: self.distancecm = distance await asyncio.sleep_ms(100) else: self.distancecm = None except OSError as ex: pri...