CPX and datalogger extension and battery power

I’ve been using my CPX devices to collect sensor data while they are connected to the computer. I found that there’s a datalogger extension for makecode that can be used to easily collect and download data to a spreadsheet. Is there a way to use this extension, or another to collect data while the CPX is battery powered? I can’t seem to collect data without the computer providing power. Thanks!