Hello sir ,,. I have an issue with arduino pro micro 32u4 board with 74hc595. I want to extending digital pins of arduino pro micro board using 74hc595. I am new to arduino . But I know how to use all inputs pins on arduino board. I am making a midi device, in which I need to add 40 or 40+ pushing buttons and 1 old display. I also know use of display with arduino board . I have tried 74hc595 shift register with arduino board using mega das IOextention library (digital Read example) I saw , example is working . Because there is one input pin of 74hc595 used as digital Read . But when I tried 2 or others input pins , resulting is wrong
..................
#include <MegaDAS_IOExtension.h>
const int SH_CP=10;
const int DS=14;
const int ST_CP=16;
const int IN_P=4;
IOExtension myExt(SH_CP, DS, ST_CP, IN_P);
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (myExt.DigitalRead(1)==HIGH) {
Serial.println("on1");
}
if (myExt.DigitalRead(1)==LOW) {
Serial.println("off1");
}
if (myExt.DigitalRead(2)==HIGH) {
Serial.println("on2");
}
if (myExt.DigitalRead(2)==LOW) {
Serial.println("off2");
}
}
. now if button1 or button2 is pressed (not both at once ) , serial monitor displaying.....
on1
on2
if button1 or button2 is released , serial monitor displaying.......
off1
off2
,,,,,,,,,,, even then if any other button is pressed serial monitor displaying.....
on1
on2
,,,,,,,,,,,,,,,,,,,,,, even then if any other button is released serial monitor displaying.....
off1
off2
i mean to say that all input pins from 74hc595 giving same result. and every pin is not giving its own result,,
please try to understand and solve my problem,,,,,if any can do,,,,,, many many thanks in advance