I am using 4 push buttons ,four shift registers and four seven segment displays. My project is to for a garment factory.There are four sewing lines. When a sewing line doesn’t have cut fabric they should inform it to the cutting department.Here I need to select who wanted cut fabric first,who wants it second,thirdly and who wants cut fabric at last . I am using push buttons to press when they want cut fabric. A seven segment display is allocated for one button.Likewise there are four seven segment displays for four push buttons.If a button is pressed firstly it should show number 1 on the display.If a button is pressed secondly it should display number 2 on the attached display to pushbutton. My intention is to prioritize push button presses.
My code runs OK if one button is pressed at one time.If two or more buttons have been pressed it shows the same number on every display.
Can anybody suggest me a way to prioritize signal inputs.
four_bttn_shiftedssd.ino (15.1 KB)