I'm trying to monitor whether a switch is opened or closed. I am using a mini D1 with pin D4 as an input. I've used a resistor between ground and pin D4 so I'm sure it's wired right but I'm absolutely certain I'm missing the required code. Running it without the code it will sense that the switch goes open but that's where it ends. In order to get the board to reconnect and reset I have to remove power from the board. I've looked in the forums and google for possible hints to no avail. I'm 72 years old and kind of new to the Arduino and would appreciate it someone can help an old man out.
Announcement
Collapse
No announcement yet.
Monitor a dry contact switch help
Collapse
X
-
There is no need for any resistors on the switched input, just connect the pin to ground for closed and disconnect to show open in HS.
Did you follow the manual for the board setup? Please answer the following to help find the problem.- Are you using Arduino plugin V.166?
- Did you set up the board and then download the sketch from the plugin?
- Did you upload the sketch to the board?
- Is the board showing connected in HS?
- Did you set up pin D4 in HS as an input pin in the board setup page?
If you can not get this to work then please enable debugging in the plugin settings page then try and connect the board, wait 5min then disable debug logging and download the debug file and send it to me.
Greig.
Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
-
Yes using V.166
Yes downloaded the sketch
Yes sketch is uploaded to the board
Yes shows connected in HS3
Yes pin 4 set as input pin with debounce as 500
So what you are saying the two leads to the dry contact switch go from 5V and pin 4? No need for a resistor to ground?
This is my 13th board but the first that monitors whether a switch is open or closed.
Have upgraded to HS4 and your plugin but want to get this working before I switch.
Thanks
Comment
-
No, your input is between D4 and ground no 5v required.
This is an Uno with pin2 as a switched input.
Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
No problems. Have Fun!Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
Originally posted by enigmatheatre View PostNo, your input is between D4 and ground no 5v required.
This is an Uno with pin2 as a switched input.
If I plan to have 3 or 4 buttons attached to UNO, should I use some additional power source to run it, or a 9V/5Z adapter should cover it? (attaching also an ethernet board onto UNO, since I need it to communicate with HS)
Comment
-
If you just have an Uno with Ethernet and 3 inputs then a 9v psu will do fine. Just make sure the current is hi enough as the Ethernet shields can be funny if not.Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
Originally posted by simon_bagola View Post
Oh my oh my... I wanted to write 9V/5A psu... that should be OK, I hope
Sent from my SM-G991B using Tapatalk
Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
Comment