BI-DIRECTIONAL PEOPLE SENSOR AND COUNTER USING ARDUINO BOARD

Below is my modified code;

The code needs to sit between the code tags.

Change the pattern defination to this

byte digitPatterns [] = {
//ABCDEFG    
B0000000, // 0
B1000000, // 1
B0100000, // 2
B0010000, // 3
B0001000, // 4
B0000100, // 5
B0000010, // 6
B0000001, // 7
B1111111, // 8
B1110011, // 9

Then tell us what is displayed for digits 0 to 7. Do this by drawing a diagram of the lit and unlit segments for each number. Then we can tell you what patterns to use.