Only read from the temp characteristic if the connection is still active.
Improves the example by avoiding a TypeError exception if/when the sensor
disconnects.
Mostly small cleanups to put each top-level import on its own line. But
explicitly disable the lint for examples/tests which insert the current
directory into the path before importing.
Signed-off-by: Angus Gratton <angus@redyak.com.au>