D2 pin logic state is reversed

I'm building midi device which uses the arduino nano v3 and i use an XY matrix button set up and only d2 pin which i choose to be positive row but it trigger the function when no button pressed and vice versa while the rest of the pins work fine.It ruins my whole circuit now with annoying illogical behavior like noise and craps.In a nutshell,it's LOW when pressed and HIGH when released,i feel crazy now when i almost finish my product.

No schematic, no photos of wiring, no code, no help. I fail to see how we can help with the (lack of) information provided.

what ?

Show us a good schematic of your circuit.

Show us a good image of your ‘actual’ wiring.

Give links to components.

In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the </> icon from the ‘reply menu’ to attach the copied sketch.

thank,some pro on quora did help me out.Now i dont need help here anymore

Glad you got things working.

Come again in thirty years.

Flattery will get you nowhere.


it's called "active low" man.In the case if someone will have the same problem.it mean the pin was designed to be active when it's low.

It’s positively negative true logic.

Thanks for sharing!

It always helps if you learn something to stop back and tell us noobs to be on the lookout for this.


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.