Hi y'all,
I have a custom PCB designed for the MDBT42Q module(it's a wristwatch). The whole thing's powered by a 12mm CR1225 coin cell. I've been doing some battery life tests and today was the fifth day on the same battery.
I decided to implement the Bluetooth HID function so that my watch can allow me to control music hands-free. However, after uploading the code and testing things out, the battery died about 10 minutes later. I thought it was because my battery just happened to be low when I added the new function. So I put in a new battery, and it was drained in less than an hour.
Can someone please tell me what I'm doing wrong? I believe there's a reason it's called Bluetooth Low Energy...
EDIT: So I found out the battery's still alive and my smart devices can still connect to my watch. The hands-free control still works. However, none of the LEDs on my watch can light up.
Here's the code I used for the hands-free music control function:
var controls = require("ble_hid_controls");
NRF.setServices(undefined, { hid : controls.report });
setWatch(function(e) {
var len = e.time - e.lastTime;
if (len > 0.3) {
controls.next();
} else {
controls.playpause();
}
}, BTN, { edge:"falling",repeat:true,debounce:50});
Sorry if things sounded a bit confusing, I'm Korean so English is not my first language.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi y'all,
I have a custom PCB designed for the MDBT42Q module(it's a wristwatch). The whole thing's powered by a 12mm CR1225 coin cell. I've been doing some battery life tests and today was the fifth day on the same battery.
I decided to implement the Bluetooth HID function so that my watch can allow me to control music hands-free. However, after uploading the code and testing things out, the battery died about 10 minutes later. I thought it was because my battery just happened to be low when I added the new function. So I put in a new battery, and it was drained in less than an hour.
Can someone please tell me what I'm doing wrong? I believe there's a reason it's called Bluetooth Low Energy...
EDIT: So I found out the battery's still alive and my smart devices can still connect to my watch. The hands-free control still works. However, none of the LEDs on my watch can light up.
Here's the code I used for the hands-free music control function:
Sorry if things sounded a bit confusing, I'm Korean so English is not my first language.