Battery Life Status From Mita
Risposta
22/08/19 21.40

Hello,

 Is there a function for getting data of battery from Mita? For example, we can get acceleration data by typing "every 1 sec". I also want to read batttery life

Thank you,

0 (0 Voti)
RE: Battery Life Status From Mita
Risposta
27/08/19 9.35 come risposta a Serhan Kalmis.

Hi

Do you want to read battery life after every interval ?

Thanks

Priyashi

0 (0 Voti)
RE: Battery Life Status From Mita
Risposta
04/09/19 12.59 come risposta a Priyashi Yadav.

Hello Serhan,

 

 I used this function to access to the XDK battery life, if I understood your request.

every 1000 milliseconds { //battery
    let ps = XDK110.powerStatus.read();
    where(ps) {
        is(PowerStatus.Battery -> level) {
            println(`Battery level: approx. ${level}%`);
        }
        is(PowerStatus.Corded) {
            println("Charged");
        }
    }   
}

Kind regards

0 (0 Voti)