I am an amateur photographer, and I can't understand why the major camera brands (Canon, Nikon, Sony, Fuji, etc.) aren't open at least to the concept of SDK's to control their cameras (let alone opening the lens mount specifications)... It would make their cameras much more flexible and useful, thus perhaps gaining some users that currently use smartphones where it seems there is greater control over and integration…
They really don't want to send you a new camera. The dangerous thing with code controlling hardware directly, is absent safe guards you can easily exceed the mechanical limits of the device.
This is why seriously overclocking a CPU will definitely void the warranty, but at the same time CPUs are often marketed based on how well they handle overclocking.