Since the bitmap is large use mpy-cross to precompile the bluemarble.py module to save memory.
mpy-cross bluemarble.py
Upload the compiled bitmap module bluemarble.mpy and example program pbitmap.py
Bluemarble image courtesy of the NASA image and video gallery available at
https://images.nasa.gov/
1""" 2bluemarble.py 3============= 4 5 .. figure:: /_static/bluemarble.png 6 :align: center 7 8 Draw a full screen bitmap on the display. 910 Convert bluemarble.jpg to bitmap module1112 .. code-block:: console1314 utils/image_converter.py bluemarble.jpg 8 >bluemarble.py1516 Since the bitmap is large use mpy-cross to precompile the bluemarble.py module to save memory.1718 .. code-block:: console1920 mpy-cross bluemarble.py2122 Upload the compiled bitmap module `bluemarble.mpy` and example program `pbitmap.py`2324 Bluemarble image courtesy of the NASA image and video gallery available at25 https://images.nasa.gov/26"""2728importgc29importtime30importgc9a0131importtft_config3233importbluemarble_bitmap343536defmain():37"""38 Draw the bitmap on the display39 """40gc.enable()41gc.collect()4243# initialize display44tft=tft_config.config(tft_config.TALL)4546# enable display and clear screen47tft.init()48tft.fill(gc9a01.BLACK)4950# display bitmap51tft.pbitmap(bluemarble_bitmap,0,0)525354main()