Battery Life Status From Mita
Answer
8/22/19 9:40 PM

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 Votes)
RE: Battery Life Status From Mita
Answer
8/27/19 9:35 AM as a reply to Serhan Kalmis.

Hi

Do you want to read battery life after every interval ?

Thanks

Priyashi

0 (0 Votes)
RE: Battery Life Status From Mita
Answer
9/4/19 12:59 PM as a reply to 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 Votes)