Need help with a Seeeduino...

So i have were given this seeeduino v4.2 (with three grove connectors) and 2 matters I want to connect to the grove connectors (a push button and an electro magnet.



My trouble now’s that it looks like A4 and A5 (the 2 I2C grove connectors) are tied to every other. If I press the button, the electromagnet activates. The code I wrote ought to maintain the electromagnet on for five seconds as soon as the button is released.



So I tried shifting the electromagnet to the UART grove connector… and it is simply continuously on, regardless of button press.



So I attempted simply the button and the use of the button function in which the button activates the light. It did not depend if the button become related to A4 or A5, it nevertheless grew to become at the light whilst depressed.



Am I doing some thing incorrect? Or can you most effective use 1 of those grove connectors?



thanks!

Hi,



can you share the code or block diagram? it helps to understand better .