Sensors not reading on cortex??

So i have recently been using more and more sensors and i filled up all the digital ports but for some odd reason when i have 4 sonars it decides to not read one of the encoders and a sonar in the debugger or at all, i have no idea what the problem is and the ports and sensors work.
Thanks for the help.

There is a thread somewhere on here, I’m on my phone right now or else I’d link to it, about this issue. It’s an issue with the Cortex and using both ports 4 and 10 as interrupts. If you have 2 limit/bump switches in your arsenal of sensors, you can rearrange it so say 1 and 4 are just digital inputs and then you can have 5 other sensors that take up 2 ports each. At least that configuration should work in theory from what I understand.

Ahh, that kinda sucks…

Thank you for telling me though.