Cyberpunk Holocube

Cyberpunk Holocube

Description

All items needed are listed below + circuit python code on how to get the display working with a raspberry pi pico. Items: a.co/d/9eBgPwW - dupont wire connectors a.aliexpress.com/_m0tgLcg - prism a.co/d/3Y0aKh0 - raspberry pi pico https://www.amazon.ca/dp/B0983P263K?ref=ppx_pop_mob_ap_share - ST7735 TFT display Tutorial: https://educ8s.tv/raspberry-pi-pico-color-display-st7735-tutorial/ Note - The code and tutorial here are not mine but I modified it slightly to only display an inch by inch square image on a portion of the display that will fit the prism (modified Circuit Python code below) import board,busio from time import sleep from adafruit_st7735r import ST7735R import displayio mosi_pin = board.GP11 clk_pin = board.GP10 reset_pin = board.GP17 dc_pin = board.GP16 cs_pin = board.GP18 displayio.release_displays() spi = busio.SPI(clock=clk_pin, MOSI=mosi_pin) display_bus = displayio.FourWire(spi, command=dc_pin, chip_select=cs_pin , reset=reset_pin) display = ST7735R(display_bus, width=145, height=165, bgr = True) bitmap = displayio.OnDiskBitmap("/0.bmp") bitmap1 = displayio.OnDiskBitmap("/1.bmp") bitmap2 = displayio.OnDiskBitmap("/2.bmp") bitmap3 = displayio.OnDiskBitmap("/3.bmp") bitmap4 = displayio.OnDiskBitmap("/4.bmp") bitmap3 = displayio.OnDiskBitmap("/3.bmp") bitmap2 = displayio.OnDiskBitmap("/2.bmp") bitmap1 = displayio.OnDiskBitmap("/1.bmp") group = displayio.Group() display.show(group) while True: tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap1, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap2, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap3, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap4, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap3, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap2, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) tile_grid = displayio.TileGrid(bitmap1, pixel_shader=bitmap.pixel_shader) group.append(tile_grid) sleep(0.5) To upload images make sure to resize the png picture files to 120 by 120 before converting them into BMP format and saving them directly onto the pico. Doing this step will make sure the pictures are displayed properly. Enjoy :)

Statistics

Likes

0

Downloads

0

Category

Video Games