Where is data logging stored on the micro:bit V2? #18065
-
|
Not something I've used but I've seen the docs for the data logging feature in MicroPython. For the micro:bit V2 I'm curious where the data is stored. Is this in flash and is it stored on the interface microcontroller or the main (target) microcontroller? I see https://support.microbit.org/support/solutions/articles/19000129031-data-logging-faq says
That makes it sound like it's only on the interface microcontroller and not the main microcontroller? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
MicroBit uses a quite particular build of MicroPython. So this questions might be better addressed to the maintainers for microbit-micropython |
Beta Was this translation helpful? Give feedback.
-
|
The data gathered by the log module will be written to the "MY_DATA.HTM" file in the designated location. You can view the log data in a browser. For example, in my case (Linux Mint, Firefox), it (URL) would be:
The "MY_DATA.HTM" file contains all the HTML, CSS, and JavaScript necessary to render the logged data properly. You can use the command cat Try this script: from microbit import run_every, sleep, temperature
import log
@run_every(s=10)
def log_temp():
log.add(temp=temperature())
while True:
sleep(100) # prevent script endingI use mpremote to access the REPL. |
Beta Was this translation helpful? Give feedback.
-
|
@shariltumin I intended my question to be about where the data resides in terms of which of the two microcontrollers holds the data. And if it's in RAM or flash memory. |
Beta Was this translation helpful? Give feedback.
The data gathered by the log module will be written to the "MY_DATA.HTM" file in the designated location.
You can view the log data in a browser. For example, in my case (Linux Mint, Firefox), it (URL) would be:
file:///media/sharil/MICROBIT/MY_DATA.HTMThe "MY_DATA.HTM" file contains all the HTML, CSS, and JavaScript necessary to render the logged data properly. You can use the command cat
MY_DATA.HTMin a terminal to see what it looks like.Try this script:
I use mpremote to access the REPL.
+e (copy(<ctrl+shi…