# Error code 022

**URL:** <https://forum.makecode.com/t/error-code-022/33409>\
**Category:** micro:bit\
**Tags:** game\
**Created:** [January 26, 2025, 2:20am UTC](https://forum.makecode.com/t/error-code-022/33409 "2025-01-26T02:20:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valor](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valor](https://forum.makecode.com/u/Valor)\
**Post date:** [January 26, 2025, 2:20am UTC](https://forum.makecode.com/t/error-code-022/33409/1 "2025-01-26T02:20:32Z")

</div>

> **[Virtual pet](https://makecode.microbit.org/S02407-51695-67934-11059)**
>
> Microsoft MakeCode for micro:bit 出品，肯定用 ❤️。

Here is my code for reference. Once I connected to the Micro:Bit, it responded with a 022 error. Please take a look, thank you.

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [January 26, 2025, 2:23am UTC](https://forum.makecode.com/t/error-code-022/33409/2 "2025-01-26T02:23:08Z")

</div>

> **[Error codes](https://arcade.makecode.com/device/error-codes)**
>
> Your Arcade may encounter a situation that prevents it from running your code. The system software that runs the programs on your board may notify you that an error occurred. It might show this error as a numeric code on the display, LEDs, or as...

Unless the micro:bit codes are different, error code 022 is, essentially, an out of memory error.

---

<div class="post-metadata">

**Author:** ![Valor](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valor](https://forum.makecode.com/u/Valor)\
**Post date:** [January 26, 2025, 4:53am UTC](https://forum.makecode.com/t/error-code-022/33409/3 "2025-01-26T04:53:53Z")

</div>

Does that mean my code is way too complicated?

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [January 26, 2025, 4:58am UTC](https://forum.makecode.com/t/error-code-022/33409/4 "2025-01-26T04:58:01Z")

</div>

No … not exactly, anyway. I’m not very familiar with the micro:bit implementation, but I’m guessing it has to do with the OLED graphics. These devices have limited RAM. On the MakeCode Arcade side of things, drawing images in RAM quickly runs into the memory limitations.

---

<div class="post-metadata">

**Author:** ![Don](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/don/32/17989_2.png) [@Don](https://forum.makecode.com/u/Don)\
**Post date:** [January 27, 2025, 2:17am UTC](https://forum.makecode.com/t/error-code-022/33409/5 "2025-01-27T02:17:09Z")

</div>

Which micro:bit version do you have? It looks like you need a version 2 so it will not run on a version 1.

I tested it on my version 2 micro:bit and it works.

I want to say that this is a fantastic project. Well done.

---

<div class="post-metadata">

**Author:** ![Valor](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valor](https://forum.makecode.com/u/Valor)\
**Post date:** [January 27, 2025, 7:39pm UTC](https://forum.makecode.com/t/error-code-022/33409/6 "2025-01-27T19:39:22Z")

</div>

Oh, I guess you’re right. Once I removed the coding lines of the OLED display, everything works perfectly fine. Thanks for the information!

---

<div class="post-metadata">

**Author:** ![Valor](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valor](https://forum.makecode.com/u/Valor)\
**Post date:** [January 27, 2025, 7:39pm UTC](https://forum.makecode.com/t/error-code-022/33409/7 "2025-01-27T19:39:29Z")

</div>

I have been using a version 2.2 something, yet it still doesn’t work. I think it’s the problem of the OLED display, because once I removed the coding lines of the display, everything works fine. Anyway, thanks!
