i have a simple task but just wanna make sure i get it right so im asking here before starting to work on my project.
74hc595 microcontroller and want to connect it to my arduino as an input to controll 2 leds. i have a diagram for it and kind of know how to wire it but need to know two things.

Would it go on a digital pin or and analog pin (the microcontroller input)?
and what would the code be? the same as a button or something else?
as an example ( pinMode(2, INPUT); )

im connecting my audio interface(focusrite scarlett 4i4) led controller to the arduino so the the input needs to be as fast as possible

This link seems to have all the information you may need.

You're gonna get in trouble double posting.

And not using code tags is no way to make friends, either. See https://forum.arduino.cc/index.php?topic=712199.0

74HC595 is NOT a microcontroller. If you had read the link provided by Paul_KD7HB in your other post, you would know that.

I've merged your cross-posts patricklou15.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum. This is your final warning.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

You've already been asked repeatedly to take the time to learn to post code properly. You're really not being very respectful of the people you're hoping to get free assistance from. It's time for you to either straighten up and fly right or else move on to some other forum.

Thanks in advance for your cooperation.

@patricklou15 has now been permanently banned for creating multiple accounts to circumvent forum rules.

This link seems to have all the information you may need.

For other posters reading this...

The Fritzing pictures on that page are WRONG (already for more than a decade).
We (forum members) don't seem to be able to correct them, or report errors anymore.

The capacitor is wrongly drawn on pin12 of the chip, while it has to be on pin16 (supply).
The schematic diagrams are correct.

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