I'm trying to hook this doorbell sensor up, what I've found is that when I connect it, I must connect it to NC. The downside is that when I reset the Arduino, the doorbell keeps ringing until pin4 is pulled up. How can I change that in the sketch?
Also I can ring it once, it rings and then it stops working. Connection to the gateway is lost and it won't ring either.
been trying to fix it for 3 days now, but I can't seem to figure out what I've done wrong.
Hooked up pin 4 to the input pin of the relay. The relay is directly powered by 5v coming from a usb hub with 2A.
The Arduino is powered using the same 5V, with a regulator to the radio to give it 3.3V. Connected a 4.7uF cap directly on the radio.
When I reset the arduino this comes to the gateway:
0;0;3;0;9;read: 16-16-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5
0;0;3;0;9;read: 16-16-0 s=255,c=3,t=11,pt=0,l=16,sg=0:Doorbell Monito
0;0;3;0;9;read: 16-16-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
0;0;3;0;9;read: 16-16-0 s=1,c=0,t=3,pt=0,l=0,sg=0:
0;0;3;0;9;read: 16-16-0 s=0,c=0,t=1,pt=0,l=0,sg=0:
0;0;3;0;9;read: 16-16-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;0;3;0;9;send: 0-0-16-16 s=255,c=3,t=8,pt=1,l=1,sg=0,st=fail:0
I can connect perfectly to the gateway using MyMQTT on Android so I think it is failing on the side of the doorbell any help would be greatly appreciated!