Urgent: Battery, bluetooth and XIAO nrf52840 Sense configuration

I have a problem on XIAO nrf52840 Sense. I use this board to transmit data via bluetooth. Bluetooth can be read when the XIAO board is connected to a laptop USB. But when I disconnect the USB connection and use battery power, Bluetooth cannot be read or appear in the application. is there someone who can help? I really need your help

I think we heard about that problem happening before

Hi there,
In the code comment out the
“While Serial”
reload and waalaa…
HTH
GL :slight_smile: PJ
:v:

1 Like

Comment out while(!serial) in the code. This line of code is meant to make you wait for the usb serial port.

1 Like

Thanks for the suggestion it worked for me for a few seconds. Connecting Bluetooth takes longer than when connecting to USB. I use the application I made on MIT App Inventor to display data from XIAO. When Bluetooth was connected and displaying data, it only worked for a few seconds and suddenly the Bluetooth connection was lost. Is there something wrong with my battery? Or do I need to include my Arduino coding?

Hi there,
What is the battery Voltage , can You measure it?
Post the code your using we can look, But it sounds like the battery is not up to it?
Does it charge up if you leave the Serial connection?
Depending on the code , what power level are you using on the Bluetooth Side Transmit power
It should work the same with or without the connection to Serial port. UNless you have some Serial print statements in the code.
HTH
GL :slight_smile: PJ
:v:
Sound like your close though.

1 Like

The battery is rated at 4.03 volts. The charge LED lights up when connected to USB. This is my program, haha ​​sorry I’m a new engineering student :smiling_face_with_tear: :v: Sorry for sending the drive link, I don’t know why I can’t upload the program on this forum, maybe because I’m still new? :sweat:

My Coding for XIAO