Mutiple sensors with Interrupt
-
Hi All,
I am planning to connect a 8 channel relay with arduino in a room. I am also going to attach a current sensor to each relay to know if someone has switched on a device manually(To know the state of the switch).
As per my knowledge till now, only pin 2 and 3 of arduino support interrupt. If I have to send a message based on the manual operation of switch, that is current sensor reading the load and sending message to openHAB, how to go ahead with this. Am I missing something, can this be achieved ?
Please help with any pointers on this.
-
you can use several inputs into one pin.
Check out Nick's Example.
there also exist "Pin Change Interrupts" which you can google. there are libraries available for using them.
You may very likely do this completely without interrupts......
-
@BulldogLowell said:
You may very likely do this completely without interrupts......
I am planning to use current sensor with each and every switch around the house to know if someone pressed the switch. Is there a better way of doing this, then the one I am thinking.
Can you please explain, what did you mean by I can achieve this without interrupts.
-
It would be easier if you showed the type of sensor, but basically, you would be constantly reading its output, and reflecting changes between HIGH and LOW (if it has digital output) or using analog thresholds.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 24 days ago -
Home Assistant/MySensors quirks
Development • 19 days ago • OldSurferDude 19 days ago -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07