Le Potato with DHT22

  1. MCU code will never work with Linux.
  2. DHT11 is already part of the Linux kernel. Check what the driver is doing here: linux/dht11.c at master · torvalds/linux · GitHub
  3. Use device tree overlays (since they use fast kernel drivers and not random userspace libraries). We don’t have any device to test.
  4. DHT11 uses the gpiod_to_irq function so it needs an IRQ enabled kernel.
sudo apt update
sudo apt install linux-image-lc-lts-arm64
1 Like