Im trying to use this code, simple for test a sensor alarm but after a power on buzer active and non stop. I checked all connections and is apparently fine. Here the code and photos,
What is wired to pin 6? Are you sure it is not always reading HIGH since that will keep the buzzer on all the time. A schematic, even hand drawn would be better than those photos.
Im really bad for schematic, D6 is going to output of sensor 501. I measured the ping D4 of wemos and i get constant 3v can be the fault? i changed the code to use D5 of wemos instead of 4 but now i dont get any buzzer. I checked pin d6 and i get voltage when sensor detect movement.
Hi thx for the reply ,I connect in D6 position of board . If I touch sensor I get 3.6v in D6 is working this part. The pwm part other pin is not working I see D4 have constant voltage that's the reason I get activatio of buzzer when I poweron. I changed program to use another port and nothing. Apprenñy pwm in WeMos is different, is like Made via software not hardware . Regards
Finally you have the exact solution, the real trouble of me is using D instead of GPIO real numbers you give. I changed using this and now finally works!!! thx!!!
If you want to use the notation printed on the board. If you dig down into the libraries, you will find a pins_Arduino.h file that have all these Dx defined to the GPIO pins.