Thank you for the replies. I considered the ultrasonic thing too and with the swinging of the cane plus the people/objects around the school I think my readings would be skewed.
I'm thinking the accelerometer method might be my only option that isn't over the top right now.