I'm trying to add a D1 Mini board to an IKEA Vindriktning air quality sensor using the tutorial at https://github.com/Hypfer/esp8266-vindr ... cle-sensor. I want to implement it in MicroPython rather than C, like in the repo.
I am able to interface the sensor with a Raspberry Pi Zero and some Python without any problem. But when I try to use the D1 Mini, I can't get anything to show up in the UART RX pin. This is my setup:
- Connect 5V and ground from tge sensor's board to the D1 Mini.
- Connect sensor's board TX pin to D1 Mini RX pin.
- Disable REPL on UART0 with
Code: Select all
os.dupterm(None, 1)
- Create UART client with
Code: Select all
uart = UART(0, baudrate=9600, timeout=100)
- Read data from RX with:
Code: Select all
while True: if uart.any(): ch = uart.read() print(ch)
Does this ring any bell? Thank you for helping!
AP
PS1 - the TX pin on the D1 Mini isn't connected to anything.
PS2 - I'm running MicroPython 1.19.1
PS3 - by "can't read anything" I mean read() always times-out and any() always returns 0.