Skip to content

emilyanthony4244/Sheikah_Slate

Repository files navigation

Contributors Forks Stargazers Issues License LinkedIn


Logo

Sheikah Slate Cosplay Project

A functional, open source Sheikah Slate for cosplay or collectors.
Explore the slate »
rear render

Demo Placeholder Link

Report Bug

Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

In November 2021 I decided to tackle my next cosplay build – Nintendo’s Zelda Breath of the Wild’s Link, specifically his Royal Guardsman armor from the Champions Ballad DLC.

Sewing aside, the biggest part of the project proved to be the Sheikah slate. Initially I considered making a “dummy” prop, maybe with lights, but after doing some research I started down the Adafruit rabbit hole (thanks @ladyada) and opted to integrate a 7inch TFT touch screen, a small camera, a noisemaker, and various light sources. A prototype was built with the following specifications and functions:

  • ESP32 based microcontroller integrated with a custom PCB
  • Light up orange and blue pieces along parts of the body
  • Generate a “chirping” sound to mimic a Sheikah Sensor
  • Simulate the “sleep” image, the sheikah logo shown above, when not in use
  • Display basic menus for information

Prototype Photos:

However, the prototype had a LONG way to go… so I went back to the drawing board and rolled up a V2.0. Improvements:

  • On-board SD card integration to delete the SD shield
  • Shrunk the board considerably (check out the photos!)
  • Moved from DAC audio to a proper IIS solution
  • Deleted all the bulb LEDs, moved to addressable everything for color coordination
  • Integration of a TTL camera
  • Board updates for noise shielding
  • Proper GUI built using GUISlice Builder

V1 vs V2 board size:

(back to top)

Built With

(back to top)

Getting Started

Building your own Sheikah Slate requires approximately $450, access to a 3D printer, some basic soldering skills, acrylic paints, and patience.

Materials

Soldering Iron, a computer capable of running the Arduino IDE, glue, Philips head screwdriver, double sided tape.

AND

FDM 3D printer capable of printing clear and solid color PLA filament with a minimum build volume of 275mm x 175mm x 25mm.

OR

FDM 3D printer capable of printing solid PLA/ABS/PETG/etc AND an SLA printer capable of printing clear UV resin. I use an Anycubic Photon Mono X for SLA prints and a Creality CR10s Pro V2 for FDM prints.

OR

Money to spend at www.HUBS.com or www.shapeways.com to outsource prints.

See the BOM in root directory for parts information. 3D print costs are estimates and will be higher if you outsource this print. PCBs can be ordered at various online vendors such as PCBway.com. I have extras and can sell you one for $12 + shipping. Otherwise, you can order from PCBway where I get a cut:

PCB from PCBWay

Installation

To Use the Adafruit Feather ESP32 v2 board in the Arduino IDE, you’ll need to follow the guide linked here: https://learn.adafruit.com/adafruit-esp32-feather-v2

All the necessary libraries “should” be in the Arduino folder above. Drop these in your local Arduino libraries folder for use. Open the SheikahSlate.ino file, select your board, and upload. If this doesn’t work, toss the library files in your default Arduino Libraries folder. Make sure you don’t have any conflicts in names or versions.

(back to top)

How it works

The Sheikah Slate combines the Adafruit RA8875 TFT driver board and Adafruit 7in 800x480 resistive touch TFT screen to simulate the in-game sheikah slate interface. The menus were created with GUIslice Builder (linked above) using the Adafruit GFX library. The SS V2 uses an ESP32 Pico microcontroller from Adafruit: the ESP32 Feather V2.

SD Implementation

A SD card slot is provided on the board. This is a cloned circuit of the Adafruit MicroSD SPI or SDIO Breakout Board. The SD is SPI only.

A note: RA8875 uses SPI mode 3 and SD uses SPI mode 0, so they are not compatible in the same SPI bus without isolation. This is why the 74HC125 chip is present. If you want to DIY you must populate this chip.

In firmware, the SD CS is set to GPIO12.

TFT Setup

An example config file was used as a base and modified. This was renamed to sheikah_tft_config.h and included at the top of sheikahslate.ino. This can also be called in GUIslice_config.h.

Unfortunately the RA8875 is not compatible with TFT_eSPI from @Bodmer, so the AdafruitGFX and RA8875 libraries must be used. The following items were modified from the base config:

#define ADAGFX_PIN_CS 27 // Display chip select changed from 10 to 25 #define ADAGFX_PIN_RST 23 // Display Reset is changed from 5 to 23 #define ADAGFX_PIN_SDCS 12 //SD CS

For development, #define DEBUG_ERR was changed to 2. For release this will toggle to 0.

All optional features toggled to 1 for development; likely won’t need GPIO input in the end but who knows.

#define GSLC_FEATURE_COMPOUND 1 // Compound elements (eg. XSelNum) #define GSLC_FEATURE_XTEXTBOX_EMBED 1 // XTextbox control with embedded color #define GSLC_FEATURE_INPUT 1 // Keyboard / GPIO input control

SD enabled for obvious reasons:

#define GSLC_SD_EN 1

Pixel Buffer increased because I’m impatient

#define GSLC_SD_BUFFPIXEL 85

A note: this pixel buffer is by default 8 bit. Even though the ESP32 can handle it, the display will not work if you increase this past 85 due to the way the SD library and GFX library reads files to the RA8875 LCD buffer. I may write a buffer for the buffer to send to the screen in larger chunks and am investigating how to speed this whole thing up. I am really concerned about the rate I can write images to the screen.

Camera

The Sheikah Slate features the Adafruit Miniature TTL Serial JPG camera. The camera captures 640x480 images and saves them to the SD in jpg format using the Adafruit VC0706 Camera library. The file names are formatted “IMAGExx.JPG” from 00 to 99.

When the Camera menu is selected, the user has the option to turn “flash” on and off. “Flash” is just lighting the NeoPixels on the back 100% brightness full white. This is just to help in low light; the VC0706 has auto brightness so there are no other settings in this menu.

Using the TJpg_Decoder library (also from @Bodmer), the jpgs are processed and resaved as 24bit BMP files and then displayed on the TFT. Jpeg files must be in 24bit format; luckily, the Adafruit TTL Serial Camera takes 24bit depth jpg images so it’s an easy conversion.

The Sheikah Slate does not and will never support streamed video to the display. Sorry.

Audio

TODO

Add features

There are 5 GPIO pins broken out in case you ever want to add something. Be aware that GPIO34, 36, and 39 are input only.

NeoPixels

Finally, the slate has 11 button NeoPixels, a 16 pixel Ring, a Flora, and a 20 LED strip all from Adafruit. They’re all strung together and addressed on GPIO26. The order of the NeoPixels is as follows:

Position 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Description Lashes Dots Back Ring Flora Dots Front Strip Handle
Default Color Amber Blue Amber
Default Brightness 30%
Low Battery Color Amber Red Blue Amber
Low Battery Brightness 10% 40% 10%
Idle Color Amber Blue Amber
Idle Brightness Breathe 1% to 25%
Photo Menu Color White Amber
Photo Menu Brightness toggle 0% or 100% 30%

A note regarding memory, core usage, etc

The libraries required for this project built with an entirely empty sketch took uses about 0.3MB of flash memory. Be wise about adding screens with the GUISlice Builder and store all images on the SD. Don’t try to be sly and write to FLASH.

Currently I am not fiddling with the default core assignments in the Arduino IDE for the ESP32. I am considering offloading the SD buffer to LCD Buffer to core 1 as well as the jpg to bmp file conversion. I’d love to use both cores of the ESP32, but just one can do everything I’d like it to do.

TJpg_Decoder has an example where it renders a Jpeg file that is stored in an array within Flash memory. The Jpeg decoding is done by one processor core 0 and the rendering to TFT by processor 1. I may be able to reformat this to use the 2MB of PSRAM available.

Usage

Placeholder for menu items and features

(back to top)

Roadmap

  • Add Readme
  • Add back to top links
  • Add Installation instructions
  • [WIP] Add Arduino Firmware
  • Add Menu Images in Usage Section
  • Film Demo and take pretty photos

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

See LICENSE.txt for information.

(back to top)

Contact

Emily Anthony - @thelegendofemily

Project Link: https://github.com/emilyanthony4244/Sheikah_Slate

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)