initial code for battery monitoring and bluetooth