Please don't do this. Dozens of people have already tried. They're all terrible. There are many, many reasons why the idea is terrible.
Here's a few!
* You're putting expensive electronics into a device that's literally meant to bang into stuff, splash through mud puddles, etc..
* Batteries die and then you've lost that functionality that you've started to depend on.
* It adds weight to a device that needs to be lightweight because it's used for long periods of time
* All of the stuff you're adding can decrease the sensory and auditory feedback that the cane provides.
* The cane itself *already* does all of the things you want to do.
Also, read
$1 and
$1.