Wemos d1 mini and am2320

EDIT: It started to work Dont know why but out of desperation i turned d1 and d2 into gpio4 and 5 again and what didn’t work at first works now. :blush: I also changed scan false to true (had tried that to). I am not sure what fixed it but it works now. So hopefully this post will be helpful for people in the futur trying to figure it out :grinning:

Good evening all, I cant get an AM2320 to work with my wemos d1 mini, i get an error : [20:14:23][D][am2320:065]: AM2320:
[20:14:23][C][am2320:066]: Address: 0x5C
[20:14:23][E][am2320:068]: Communication with AM2320 failed!

SDA and SDL are connected to d1 and d2 , and i have tried with or without 4.7k resistors between them an vcc, it does not seem to make any difference.

I do see an address in my log, which means it is connected to the correct pins right? But it wont communicate

I did find an older post telling me to push the rested button on the side but alas that didnt help. I also found a setting : setup_priority: -100, but that dint help either.

Below is my yaml, i am probably doing something stupid, since i’m not experienced, but any help is appreciated. I have also uploaded a picture of my breadboard
(I did try renaming d1 and d2 to gpio4 and 5, but that didn’t help either.)

captive_portal:

i2c:
     sda: D1 <<changed that to GPIO4
     scl: D2 <<Changed that to GPIO5
     scan: false  << Changed that to true

sensor:
  - platform: am2320
    setup_priority: -100
    address: 0x5C
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 60s`

To make it easier to read, the working yaml below.

captive_portal:

i2c:
     sda: GPIO4
     scl: GPIO5
     scan: true

sensor:
  - platform: am2320
    setup_priority: -100
    address: 0x5C
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 60s

Perhaps you were confused about the pins. D1 = gpio5 https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/

I suspect i was , i set scan: false and everything’s still working so i suspect it was the pin assignment.

it is processors afterall, 1s and 0s …so generally I assume it is PICNIC (Problem In Chair Not Computer) when i try this kind of “new” stuff …can be hella frustrating though lol, that’s why i made sure I updated my post, for a newbie in building PCB’s like me the info is not always as obvious as you may think, and I am an IT tutor actually , but network and sys admin so different ballgame.

But hey 24hrs to learn a new skil to build a simple pcb and read a sensor … im not complaining… will be using this as a teaching moment for my students next Monday
…keep it up even if its frustrating!

Just bookmark that site i gave you. They have an esp32 pinout page too. They are invaluable.

1 Like