# Pull CPP files (Online makecode.microbit.org)

**URL:** https://forum.makecode.com/t/pull-cpp-files-online-makecode-microbit-org/19532
**Category:** micro:bit extensions
**Created:** [May 1, 2023, 12:12am UTC](https://forum.makecode.com/t/pull-cpp-files-online-makecode-microbit-org/19532 "2023-05-01T00:12:41Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)
#### Post date: [May 8, 2023, 4:50pm UTC](https://forum.makecode.com/t/pull-cpp-files-online-makecode-microbit-org/19532/6 "2023-05-08T16:50:24Z")

</div>

Hey @mwest226 ,

I had some time over the past couple of days, so I created a prototype extension for get/put to flashstorage: [https://github.com/bsiever/microbit-pxt-flashstorage](https://github.com/bsiever/microbit-pxt-flashstorage) .

I haven’t (yet) added support for anything other than storing and retrieving strings. Here’s a demo that actually stores a counter value by converting it to/from a string: [https://makecode.microbit.org/\_hiXaDp0aoAuF](https://makecode.microbit.org/_hiXaDp0aoAuF)

- It’ll retrieve a stored counter when it starts.
- Button A increases the counter (but doesn’t update flash)
- Button A+B decreases the counters (but doesn’t update flash)
- Button B will update the flash with the current counter.

It also has some simulator support…but the simulator doesn’t really have flash so the refresh/reload resets all stored values. Still, if there is a store/put in one block and a retrieve/get in another, I think it’ll appear to work ok.

If a value isn’t in the storage the `get()` returns an empty string, so string length can be checked to see if a `get()` fails. It can use a lot more testing and a little cleanup. I think other functionality, like overloading for numeric types, can all be done just within the flashstorage.ts.

Hope that helps!

---

_[View the full topic](https://forum.makecode.com/t/pull-cpp-files-online-makecode-microbit-org/19532)._
